|
| 1 | +error: Undefined Behavior: write access through <TAG> is forbidden |
| 2 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 3 | + | |
| 4 | +LL | *LEAK = 7; |
| 5 | + | ^^^^^^^^^ write access through <TAG> is forbidden |
| 6 | + | |
| 7 | + = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental |
| 8 | + = help: the accessed tag <TAG> is a child of the conflicting tag <TAG> |
| 9 | + = help: the conflicting tag <TAG> has state Disabled which forbids this child write access |
| 10 | +help: the accessed tag <TAG> was created here |
| 11 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 12 | + | |
| 13 | +LL | fn unknown_code_1(x: &i32) { |
| 14 | + | ^ |
| 15 | +help: the conflicting tag <TAG> was created here, in the initial state Frozen |
| 16 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 17 | + | |
| 18 | +LL | unknown_code_1(&*our); |
| 19 | + | ^^^^^ |
| 20 | +help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] |
| 21 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 22 | + | |
| 23 | +LL | *our = 5; |
| 24 | + | ^^^^^^^^ |
| 25 | + = help: this transition corresponds to a loss of read permissions |
| 26 | + = note: BACKTRACE (of the first span): |
| 27 | + = note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC |
| 28 | +note: inside `demo_box_advanced_unique` |
| 29 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 30 | + | |
| 31 | +LL | unknown_code_2(); |
| 32 | + | ^^^^^^^^^^^^^^^^ |
| 33 | +note: inside `main` |
| 34 | + --> $DIR/box_exclusive_violation1.rs:LL:CC |
| 35 | + | |
| 36 | +LL | demo_box_advanced_unique(Box::new(0)); |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 38 | + |
| 39 | +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace |
| 40 | + |
| 41 | +error: aborting due to previous error |
| 42 | + |
0 commit comments