explain what the open questions are, and add a Miri test for that

This commit is contained in:
Ralf Jung 2024-05-30 09:07:06 +02:00
parent 5c497cb3f0
commit 5c68a15e41
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,12 @@
// Miri currently doesn't require types without drop glue to be
// valid when dropped. This test confirms that behavior.
// This is not a stable guarantee!
use std::ptr;
fn main() {
let mut not_a_bool = 13u8;
unsafe {
ptr::drop_in_place(&mut not_a_bool as *mut u8 as *mut bool)
};
}