summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/tree-borrows/write-during-2phase.stderr
blob: e511eb9cf8fbb816a2ccb4eb0dd043474bb1a8e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error: Undefined Behavior: read access through <TAG> is forbidden because it is a child of <TAG> which is Disabled.
  --> $DIR/write-during-2phase.rs:LL:CC
   |
LL |     fn add(&mut self, n: u64) -> u64 {
   |            ^^^^^^^^^ read access through <TAG> is forbidden because it is a child of <TAG> which is Disabled.
   |
   = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
   = note: BACKTRACE:
   = note: inside `Foo::add` at $DIR/write-during-2phase.rs:LL:CC
note: inside `main`
  --> $DIR/write-during-2phase.rs:LL:CC
   |
LL |       let _res = f.add(unsafe {
   |  ________________^
LL | |         let n = f.0;
LL | |         // This is the access at fault, but it's not immediately apparent because
LL | |         // the reference that got invalidated is not under a Protector.
LL | |         *inner = 42;
LL | |         n
LL | |     });
   | |______^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to previous error