Skip to content

Commit 6e05331

Browse files
committed
Auto merge of #125761 - matthiaskrgr:rollup-7u082og, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #125342 (Document platform-specifics for `Read` and `Write` of `File`) - #125711 (Make `body_owned_by` return the `Body` instead of just the `BodyId`) - #125739 (drop_in_place: weaken the claim of equivalence with drop(ptr.read())) - #125745 (Bump the stage0 compiler to beta.7 (2024-05-26)) - #125746 (Fix copy-paste error in `Duration::from_weeks` panic message.) - #125753 (compiletest: Unify `cmd2procres` with `run_command_to_procres`) - #125754 (coverage: Rename MC/DC `conditions_num` to `num_conditions`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 288bc88 + 0535f26 commit 6e05331

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pass/drop_in_place.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)