diff options
| author | mark <markm@cs.wisc.edu> | 2018-06-18 21:11:59 -0500 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2018-06-24 16:16:14 -0500 |
| commit | e3534028ebcd34b131228a05c1787ad8895209ec (patch) | |
| tree | 7c7f8a711bab42348bd00c46b8892db945996f57 /src | |
| parent | 08479aabd03d576e4b2050cd4733e75a2b932f80 (diff) | |
fix test
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/allocator-submodule.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/ui/allocator-submodule.rs b/src/test/ui/allocator-submodule.rs index 40e5940c558..39b65766924 100644 --- a/src/test/ui/allocator-submodule.rs +++ b/src/test/ui/allocator-submodule.rs @@ -15,16 +15,19 @@ extern crate alloc; -use std::alloc::{GlobalAlloc, Layout, Opaque}; +use std::{ + alloc::{GlobalAlloc, Layout}, + ptr, +}; struct MyAlloc; unsafe impl GlobalAlloc for MyAlloc { - unsafe fn alloc(&self, layout: Layout) -> *mut Opaque { - 0 as usize as *mut Opaque + unsafe fn alloc(&self, layout: Layout) -> *mut u8 { + ptr::null_mut() } - unsafe fn dealloc(&self, ptr: *mut Opaque, layout: Layout) {} + unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {} } mod submod { |
