Skip to content

Commit c6d1d10

Browse files
committed
test(prove-rs): add noop drop_in_place move repro
1 parent 45f8743 commit c6d1d10

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
struct Wrap(u8);
2+
3+
impl Drop for Wrap {
4+
fn drop(&mut self) {
5+
// `drop_in_place::<u8>` is compiled as a `NoOpSym`, but moving its pointer
6+
// argument must still invalidate the current frame's local.
7+
unsafe { std::ptr::drop_in_place(&mut self.0) };
8+
}
9+
}
10+
11+
fn main() {
12+
let _w = Wrap(1);
13+
}

0 commit comments

Comments
 (0)