1 error: Undefined Behavior: deallocating while item [SharedReadWrite for <TAG>] is protected by call ID
2 --> RUSTLIB/alloc/src/alloc.rs:LL:CC
4 LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating while item [SharedReadWrite for <TAG>] is protected by call ID
7 = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
8 = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
10 = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
11 = note: inside `<std::alloc::Global as std::alloc::Allocator>::deallocate` at RUSTLIB/alloc/src/alloc.rs:LL:CC
12 = note: inside `alloc::alloc::box_free::<NotUnpin, std::alloc::Global>` at RUSTLIB/alloc/src/alloc.rs:LL:CC
13 = note: inside `std::ptr::drop_in_place::<std::boxed::Box<NotUnpin>> - shim(Some(std::boxed::Box<NotUnpin>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
14 = note: inside `std::mem::drop::<std::boxed::Box<NotUnpin>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
15 note: inside closure at $DIR/deallocate_against_protector2.rs:LL:CC
16 --> $DIR/deallocate_against_protector2.rs:LL:CC
18 LL | drop(unsafe { Box::from_raw(raw) });
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 = note: inside `<[closure@$DIR/deallocate_against_protector2.rs:LL:CC] as std::ops::FnOnce<(&mut NotUnpin,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC
21 note: inside `inner` at $DIR/deallocate_against_protector2.rs:LL:CC
22 --> $DIR/deallocate_against_protector2.rs:LL:CC
26 note: inside `main` at $DIR/deallocate_against_protector2.rs:LL:CC
27 --> $DIR/deallocate_against_protector2.rs:LL:CC
29 LL | / inner(Box::leak(Box::new(NotUnpin(0, PhantomPinned))), |x| {
30 LL | | let raw = x as *mut _;
31 LL | | drop(unsafe { Box::from_raw(raw) });
35 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
37 error: aborting due to previous error