1 error: Undefined Behavior: attempting deallocation using <TAG> at ALLOC, but that tag does not exist in the borrow stack for this location
2 --> RUSTLIB/alloc/src/alloc.rs:LL:CC
4 LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempting deallocation using <TAG> at ALLOC, but that tag does not exist in the borrow stack for this location
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..0x1]
10 --> $DIR/illegal_deALLOC.rs:LL:CC
12 LL | let ptr2 = (&mut *ptr1) as *mut u8;
14 help: <TAG> was later invalidated at offsets [0x0..0x1] by a write access
15 --> $DIR/illegal_deALLOC.rs:LL:CC
20 = note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
22 --> $DIR/illegal_deALLOC.rs:LL:CC
24 LL | dealloc(ptr2, Layout::from_size_align_unchecked(1, 1));
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
29 error: aborting due to previous error