We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 631d5fa commit 2a08f2fCopy full SHA for 2a08f2f
tests/compile-fail/validity/invalid_wide_raw.rs
@@ -0,0 +1,8 @@
1
+fn main() {
2
+ trait T { }
3
+ #[derive(Debug)]
4
+ struct S {
5
+ x: * mut dyn T
6
+ }
7
+ dbg!(S { x: unsafe { std::mem::transmute((0usize, 0usize)) } }); //~ ERROR: encountered dangling or unaligned vtable pointer
8
+}
0 commit comments