1
Fork 0

Rollup merge of #76993 - blitzerr:alloc-ref, r=Amanieu

Changing the alloc() to accept &self instead of &mut self

Fixes: [#55](https://github.com/rust-lang/wg-allocators/issues/55)

This is the first cut. It only makes the change for `alloc` method.
This commit is contained in:
Dylan DPC 2020-09-23 14:54:06 +02:00 committed by GitHub
commit a40d79c9fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 46 deletions

View file

@ -11,7 +11,7 @@ fn std_heap_overaligned_request() {
check_overalign_requests(Global)
}
fn check_overalign_requests<T: AllocRef>(mut allocator: T) {
fn check_overalign_requests<T: AllocRef>(allocator: T) {
for &align in &[4, 8, 16, 32] {
// less than and bigger than `MIN_ALIGN`
for &size in &[align / 2, align - 1] {