mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 15:56:09 +03:00
Auto merge of #919 - RalfJung:wide-raw, r=RalfJung
test for invalid wide raw ptr This is the Miri side of https://github.com/rust-lang/rust/pull/63880.
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
0444b9f66acb5da23dc816e0d8eb59623ba9ea50
|
||||
7445622bcb515c822a2fc6e8c57c90478c1a56bb
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fn main() {
|
||||
trait T { }
|
||||
#[derive(Debug)]
|
||||
struct S {
|
||||
x: * mut dyn T
|
||||
}
|
||||
dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling or unaligned vtable pointer
|
||||
}
|
||||
Reference in New Issue
Block a user