Skip to content

Commit 4318bfe

Browse files
committed
Auto merge of rust-lang#3843 - JoJoDeveloping:tb-bottom-up-iteration, r=RalfJung
Make TB tree traversal bottom-up In preparation for rust-lang#3837, the tree traversal needs to be made bottom-up, because the current top-down tree traversal, coupled with that PR's changes to the garbage collector, can introduce non-deterministic error messages if the GC removes a parent tag of the accessed tag that would have triggered the error first. This is a breaking change for the diagnostics emitted by TB. The implemented semantics stay the same.
2 parents 9b82f3b + 5be5cec commit 4318bfe

20 files changed

+306
-272
lines changed

src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs

Lines changed: 246 additions & 120 deletions
Large diffs are not rendered by default.

src/tools/miri/src/borrow_tracker/tree_borrows/unimap.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ impl<'a, V> UniEntry<'a, V> {
221221
}
222222
self.inner.as_mut().unwrap()
223223
}
224+
225+
pub fn get(&self) -> Option<&V> {
226+
self.inner.as_ref()
227+
}
224228
}
225229

226230
mod tests {

src/tools/miri/tests/fail/both_borrows/alias_through_mutation.tree.stderr

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,18 @@ LL | let _val = *target_alias;
55
| ^^^^^^^^^^^^^ read access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 read access
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child read access
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/alias_through_mutation.rs:LL:CC
1211
|
1312
LL | *x = &mut *(target as *mut _);
1413
| ^^^^^^^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/alias_through_mutation.rs:LL:CC
17-
|
18-
LL | retarget(&mut target_alias, target);
19-
| ^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/alias_through_mutation.rs:LL:CC
2216
|
2317
LL | *target = 13;
2418
| ^^^^^^^^^^^^
25-
= help: this transition corresponds to a loss of read and write permissions
19+
= help: this transition corresponds to a loss of read permissions
2620
= note: BACKTRACE (of the first span):
2721
= note: inside `main` at $DIR/alias_through_mutation.rs:LL:CC
2822

src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | *LEAK = 7;
55
| ^^^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/box_exclusive_violation1.rs:LL:CC
1211
|
1312
LL | fn unknown_code_1(x: &i32) {
1413
| ^
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]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/box_exclusive_violation1.rs:LL:CC
2216
|
2317
LL | *our = 5;

src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | v2[1] = 7;
55
| ^^^^^^^^^ write access through <TAG> at ALLOC[0x4] is forbidden
66
|
77
= 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
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Reserved
1110
--> $DIR/buggy_as_mut_slice.rs:LL:CC
1211
|
1312
LL | let v2 = safe::as_mut_slice(&v);
1413
| ^^^^^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/buggy_as_mut_slice.rs:LL:CC
17-
|
18-
LL | unsafe { from_raw_parts_mut(self_.as_ptr() as *mut T, self_.len()) }
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
2115
--> $DIR/buggy_as_mut_slice.rs:LL:CC
2216
|
2317
LL | v1[1] = 5;

src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | b[1] = 6;
55
| ^^^^^^^^ write access through <TAG> at ALLOC[0x4] is forbidden
66
|
77
= 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
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Reserved
1110
--> $DIR/buggy_split_at_mut.rs:LL:CC
1211
|
1312
LL | let (a, b) = safe::split_at_mut(&mut array, 0);
1413
| ^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/buggy_split_at_mut.rs:LL:CC
17-
|
18-
LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid),
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x4..0x8]
2115
--> $DIR/buggy_split_at_mut.rs:LL:CC
2216
|
2317
LL | a[1] = 5;

src/tools/miri/tests/fail/both_borrows/illegal_write5.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | let _val = *xref;
55
| ^^^^^ read access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 read access
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child read access
9+
help: the accessed tag <TAG> was created here, in the initial state Reserved
1110
--> $DIR/illegal_write5.rs:LL:CC
1211
|
1312
LL | let xref = unsafe { &mut *xraw };
1413
| ^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/illegal_write5.rs:LL:CC
17-
|
18-
LL | let xref = unsafe { &mut *xraw };
19-
| ^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/illegal_write5.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw = 15 };

src/tools/miri/tests/fail/both_borrows/load_invalid_shr.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | let _val = *xref_in_mem;
55
| ^^^^^^^^^^^^ reborrow through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 reborrow (acting as a child read access)
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access)
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/load_invalid_shr.rs:LL:CC
1211
|
1312
LL | let xref_in_mem = Box::new(xref);
1413
| ^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/load_invalid_shr.rs:LL:CC
17-
|
18-
LL | let xref = unsafe { &*xraw };
19-
| ^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/load_invalid_shr.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw = 42 }; // unfreeze

src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | *LEAK = 7;
55
| ^^^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/mut_exclusive_violation1.rs:LL:CC
1211
|
1312
LL | fn unknown_code_1(x: &i32) {
1413
| ^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/mut_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]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/mut_exclusive_violation1.rs:LL:CC
2216
|
2317
LL | *our = 5;

src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | *raw1 = 3;
55
| ^^^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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
8+
= help: the accessed tag <TAG> has state Disabled which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Reserved
1110
--> $DIR/mut_exclusive_violation2.rs:LL:CC
1211
|
1312
LL | let raw1 = ptr1.as_mut();
1413
| ^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/mut_exclusive_violation2.rs:LL:CC
17-
|
18-
LL | let raw1 = ptr1.as_mut();
19-
| ^^^^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/mut_exclusive_violation2.rs:LL:CC
2216
|
2317
LL | *raw2 = 2;

src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | foo(some_xref);
55
| ^^^^^^^^^ reborrow through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 reborrow (acting as a child read access)
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access)
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/pass_invalid_shr_option.rs:LL:CC
1211
|
1312
LL | let some_xref = unsafe { Some(&*xraw) };
1413
| ^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/pass_invalid_shr_option.rs:LL:CC
17-
|
18-
LL | let some_xref = unsafe { Some(&*xraw) };
19-
| ^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/pass_invalid_shr_option.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw = 42 }; // unfreeze

src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | foo(pair_xref);
55
| ^^^^^^^^^ reborrow through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 reborrow (acting as a child read access)
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access)
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/pass_invalid_shr_tuple.rs:LL:CC
1211
|
1312
LL | let pair_xref = unsafe { (&*xraw0, &*xraw1) };
1413
| ^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/pass_invalid_shr_tuple.rs:LL:CC
17-
|
18-
LL | let pair_xref = unsafe { (&*xraw0, &*xraw1) };
19-
| ^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4]
2115
--> $DIR/pass_invalid_shr_tuple.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw0 = 42 }; // unfreeze

src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | ret
55
| ^^^ reborrow through <TAG> at ALLOC[0x4] is forbidden
66
|
77
= 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 reborrow (acting as a child read access)
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access)
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/return_invalid_shr_option.rs:LL:CC
1211
|
1312
LL | let ret = Some(unsafe { &(*xraw).1 });
1413
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/return_invalid_shr_option.rs:LL:CC
17-
|
18-
LL | let ret = Some(unsafe { &(*xraw).1 });
19-
| ^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
2115
--> $DIR/return_invalid_shr_option.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw = (42, 23) }; // unfreeze

src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@ LL | ret
55
| ^^^ reborrow through <TAG> at ALLOC[0x4] is forbidden
66
|
77
= 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 reborrow (acting as a child read access)
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Disabled which forbids this reborrow (acting as a child read access)
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/return_invalid_shr_tuple.rs:LL:CC
1211
|
1312
LL | let ret = (unsafe { &(*xraw).1 },);
1413
| ^^^^^^^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/return_invalid_shr_tuple.rs:LL:CC
17-
|
18-
LL | let ret = (unsafe { &(*xraw).1 },);
19-
| ^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
14+
help: the accessed tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x8]
2115
--> $DIR/return_invalid_shr_tuple.rs:LL:CC
2216
|
2317
LL | unsafe { *xraw = (42, 23) }; // unfreeze

src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@ LL | *(x as *const i32 as *mut i32) = 7;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 Frozen which forbids this child write access
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Frozen which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Frozen
1110
--> $DIR/shr_frozen_violation1.rs:LL:CC
1211
|
1312
LL | fn unknown_code(x: &i32) {
1413
| ^
15-
help: the conflicting tag <TAG> was created here, in the initial state Frozen
16-
--> $DIR/shr_frozen_violation1.rs:LL:CC
17-
|
18-
LL | unknown_code(&*x);
19-
| ^^^
2014
= note: BACKTRACE (of the first span):
2115
= note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC
2216
note: inside `foo`

src/tools/miri/tests/fail/tree_borrows/alternate-read-write.stderr

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,19 @@ LL | *y += 1; // Failure
55
| ^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
66
|
77
= 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 Frozen which forbids this child write access
10-
help: the accessed tag <TAG> was created here
8+
= help: the accessed tag <TAG> has state Frozen which forbids this child write access
9+
help: the accessed tag <TAG> was created here, in the initial state Reserved
1110
--> $DIR/alternate-read-write.rs:LL:CC
1211
|
1312
LL | let y = unsafe { &mut *(x as *mut u8) };
1413
| ^^^^^^^^^^^^^^^^^^^^
15-
help: the conflicting tag <TAG> was created here, in the initial state Reserved
16-
--> $DIR/alternate-read-write.rs:LL:CC
17-
|
18-
LL | let y = unsafe { &mut *(x as *mut u8) };
19-
| ^^^^^^^^^^^^^^^^^^^^
20-
help: the conflicting tag <TAG> later transitioned to Active due to a child write access at offsets [0x0..0x1]
14+
help: the accessed tag <TAG> later transitioned to Active due to a child write access at offsets [0x0..0x1]
2115
--> $DIR/alternate-read-write.rs:LL:CC
2216
|
2317
LL | *y += 1; // Success
2418
| ^^^^^^^
2519
= help: this transition corresponds to the first write to a 2-phase borrowed mutable reference
26-
help: the conflicting tag <TAG> later transitioned to Frozen due to a foreign read access at offsets [0x0..0x1]
20+
help: the accessed tag <TAG> later transitioned to Frozen due to a foreign read access at offsets [0x0..0x1]
2721
--> $DIR/alternate-read-write.rs:LL:CC
2822
|
2923
LL | let _val = *x;

0 commit comments

Comments
 (0)