We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a72f8b2 commit 1bf4f03Copy full SHA for 1bf4f03
tests/pass/drop_in_place.rs
@@ -0,0 +1,12 @@
1
+// Miri currently doesn't require types without drop glue to be
2
+// valid when dropped. This test confirms that behavior.
3
+// This is not a stable guarantee!
4
+
5
+use std::ptr;
6
7
+fn main() {
8
+ let mut not_a_bool = 13u8;
9
+ unsafe {
10
+ ptr::drop_in_place(&mut not_a_bool as *mut u8 as *mut bool)
11
+ };
12
+}
0 commit comments