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:
commit
a40d79c9fb
7 changed files with 48 additions and 46 deletions
|
@ -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] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue