1 error: Undefined Behavior: not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
2 --> RUSTLIB/alloc/src/boxed.rs:LL:CC
4 LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of 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
9 help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
10 --> $DIR/newtype_pair_retagging.rs:LL:CC
12 LL | let ptr = Box::into_raw(Box::new(0i32));
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 help: <TAG> is this argument
15 --> $DIR/newtype_pair_retagging.rs:LL:CC
17 LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
19 = note: BACKTRACE (of the first span):
20 = note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
21 = note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
23 --> $DIR/newtype_pair_retagging.rs:LL:CC
25 LL | || drop(Box::from_raw(ptr)),
27 note: inside `dealloc_while_running::<[closure@$DIR/newtype_pair_retagging.rs:LL:CC]>`
28 --> $DIR/newtype_pair_retagging.rs:LL:CC
33 --> $DIR/newtype_pair_retagging.rs:LL:CC
35 LL | / dealloc_while_running(
36 LL | | Newtype(&mut *ptr, 0),
37 LL | | || drop(Box::from_raw(ptr)),
41 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
43 error: aborting due to previous error