Skip to content

Commit 48bbbb0

Browse files
mark-i-mpietroalbini
authored andcommitted
fix test
1 parent 0f8f238 commit 48bbbb0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/test/ui/allocator-submodule.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@
1515

1616
extern crate alloc;
1717

18-
use std::alloc::{GlobalAlloc, Layout, Opaque};
18+
use std::{
19+
alloc::{GlobalAlloc, Layout},
20+
ptr,
21+
};
1922

2023
struct MyAlloc;
2124

2225
unsafe impl GlobalAlloc for MyAlloc {
23-
unsafe fn alloc(&self, layout: Layout) -> *mut Opaque {
24-
0 as usize as *mut Opaque
26+
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
27+
ptr::null_mut()
2528
}
2629

27-
unsafe fn dealloc(&self, ptr: *mut Opaque, layout: Layout) {}
30+
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {}
2831
}
2932

3033
mod submod {

0 commit comments

Comments
 (0)