Auto merge of #1398 - RalfJung:rustup, r=RalfJung
rustup; fix error messages
This commit is contained in:
commit
2d3261de75
@ -1 +1 @@
|
||||
ff4df04799c406c8149a041c3163321758aac924
|
||||
97f3eeec8216d7155c24674b9be55e7c672bcae3
|
||||
|
@ -32,7 +32,7 @@ pub unsafe fn from_data_ptr(data: &String, ptr: *const Meta) -> &Self {
|
||||
data: data as *const _ as *const (),
|
||||
vtable: ptr as *const _ as *const (),
|
||||
};
|
||||
let obj = std::mem::transmute::<FatPointer, *mut FunnyPointer>(obj); //~ ERROR invalid drop fn in vtable
|
||||
let obj = std::mem::transmute::<FatPointer, *mut FunnyPointer>(obj); //~ ERROR invalid drop function pointer in vtable
|
||||
&*obj
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,5 @@
|
||||
use std::mem;
|
||||
|
||||
fn main() {
|
||||
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR reference to unallocated address 16
|
||||
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR encountered a dangling reference (address 16 is unallocated)
|
||||
}
|
||||
|
@ -6,5 +6,5 @@ trait T { }
|
||||
struct S {
|
||||
x: * mut dyn T
|
||||
}
|
||||
dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling or unaligned vtable pointer
|
||||
dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling vtable pointer
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user