We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f8f238 commit 48bbbb0Copy full SHA for 48bbbb0
src/test/ui/allocator-submodule.rs
@@ -15,16 +15,19 @@
15
16
extern crate alloc;
17
18
-use std::alloc::{GlobalAlloc, Layout, Opaque};
+use std::{
19
+ alloc::{GlobalAlloc, Layout},
20
+ ptr,
21
+};
22
23
struct MyAlloc;
24
25
unsafe impl GlobalAlloc for MyAlloc {
- unsafe fn alloc(&self, layout: Layout) -> *mut Opaque {
- 0 as usize as *mut Opaque
26
+ unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
27
+ ptr::null_mut()
28
}
29
- unsafe fn dealloc(&self, ptr: *mut Opaque, layout: Layout) {}
30
+ unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {}
31
32
33
mod submod {
0 commit comments