From 9084b3ebe2e5b46ca5b9fb31698b6d6222cfa1d2 Mon Sep 17 00:00:00 2001 From: Johannes Hostert Date: Tue, 19 Aug 2025 14:34:28 +0200 Subject: [PATCH 1/2] link to TB doc in unsafe-code-guidelines --- src/diagnostics.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 9ecbd31c5b..b5ca960154 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -282,7 +282,8 @@ pub fn report_error<'tcx>( }, TreeBorrowsUb { title: _, details, history } => { let mut helps = vec![ - note!("this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental") + note!("this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental"), + note!("see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information"), ]; for m in details { helps.push(note!("{m}")); From f47cda8cb9023834da0865fc0ee7fc690ec46d3c Mon Sep 17 00:00:00 2001 From: Johannes Hostert Date: Tue, 19 Aug 2025 14:46:33 +0200 Subject: [PATCH 2/2] God bless the tests --- tests/fail/async-shared-mutable.tree.stderr | 1 + tests/fail/both_borrows/alias_through_mutation.tree.stderr | 1 + tests/fail/both_borrows/aliasing_mut1.tree.stderr | 1 + tests/fail/both_borrows/aliasing_mut2.tree.stderr | 1 + tests/fail/both_borrows/aliasing_mut3.tree.stderr | 1 + tests/fail/both_borrows/aliasing_mut4.tree.stderr | 1 + tests/fail/both_borrows/box_exclusive_violation1.tree.stderr | 1 + tests/fail/both_borrows/box_noalias_violation.tree.stderr | 1 + tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr | 1 + tests/fail/both_borrows/buggy_split_at_mut.tree.stderr | 1 + tests/fail/both_borrows/illegal_write1.tree.stderr | 1 + tests/fail/both_borrows/illegal_write5.tree.stderr | 1 + tests/fail/both_borrows/illegal_write6.tree.stderr | 1 + .../fail/both_borrows/invalidate_against_protector2.tree.stderr | 1 + .../fail/both_borrows/invalidate_against_protector3.tree.stderr | 1 + tests/fail/both_borrows/load_invalid_shr.tree.stderr | 1 + tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr | 1 + tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr | 1 + tests/fail/both_borrows/newtype_pair_retagging.tree.stderr | 1 + tests/fail/both_borrows/newtype_retagging.tree.stderr | 1 + tests/fail/both_borrows/outdated_local.tree.stderr | 1 + tests/fail/both_borrows/pass_invalid_shr.tree.stderr | 1 + tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr | 1 + tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr | 1 + tests/fail/both_borrows/return_invalid_shr.tree.stderr | 1 + tests/fail/both_borrows/return_invalid_shr_option.tree.stderr | 1 + tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr | 1 + tests/fail/both_borrows/shr_frozen_violation1.tree.stderr | 1 + tests/fail/both_borrows/shr_frozen_violation2.tree.stderr | 1 + tests/fail/both_borrows/zero-sized-protected.tree.stderr | 1 + tests/fail/function_calls/arg_inplace_mutate.tree.stderr | 1 + tests/fail/function_calls/arg_inplace_observe_during.tree.stderr | 1 + .../fail/function_calls/return_pointer_aliasing_read.tree.stderr | 1 + .../function_calls/return_pointer_aliasing_write.tree.stderr | 1 + .../return_pointer_aliasing_write_tail_call.tree.stderr | 1 + tests/fail/tree_borrows/alternate-read-write.stderr | 1 + tests/fail/tree_borrows/cell-inside-struct.stderr | 1 + tests/fail/tree_borrows/error-range.stderr | 1 + tests/fail/tree_borrows/fnentry_invalidation.stderr | 1 + tests/fail/tree_borrows/outside-range.stderr | 1 + tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr | 1 + tests/fail/tree_borrows/pass_invalid_mut.stderr | 1 + tests/fail/tree_borrows/protector-write-lazy.stderr | 1 + .../tree_borrows/repeated_foreign_read_lazy_conflicted.stderr | 1 + tests/fail/tree_borrows/reserved/cell-protected-write.stderr | 1 + tests/fail/tree_borrows/reserved/int-protected-write.stderr | 1 + tests/fail/tree_borrows/reservedim_spurious_write.with.stderr | 1 + tests/fail/tree_borrows/reservedim_spurious_write.without.stderr | 1 + tests/fail/tree_borrows/return_invalid_mut.stderr | 1 + tests/fail/tree_borrows/spurious_read.stderr | 1 + tests/fail/tree_borrows/strongly-protected.stderr | 1 + .../tree_borrows/subtree_traversal_skipping_diagnostics.stderr | 1 + tests/fail/tree_borrows/write-during-2phase.stderr | 1 + 53 files changed, 53 insertions(+) diff --git a/tests/fail/async-shared-mutable.tree.stderr b/tests/fail/async-shared-mutable.tree.stderr index 17efb10ceb..449a29088a 100644 --- a/tests/fail/async-shared-mutable.tree.stderr +++ b/tests/fail/async-shared-mutable.tree.stderr @@ -5,6 +5,7 @@ LL | *x = 1; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/async-shared-mutable.rs:LL:CC diff --git a/tests/fail/both_borrows/alias_through_mutation.tree.stderr b/tests/fail/both_borrows/alias_through_mutation.tree.stderr index 9e992f88f0..95b7e99ded 100644 --- a/tests/fail/both_borrows/alias_through_mutation.tree.stderr +++ b/tests/fail/both_borrows/alias_through_mutation.tree.stderr @@ -5,6 +5,7 @@ LL | let _val = *target_alias; | ^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC diff --git a/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/tests/fail/both_borrows/aliasing_mut1.tree.stderr index e331ff2406..207ed3131a 100644 --- a/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -5,6 +5,7 @@ LL | *x = 1; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC diff --git a/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/tests/fail/both_borrows/aliasing_mut2.tree.stderr index a2191da0b4..90b1b1294c 100644 --- a/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -5,6 +5,7 @@ LL | *y = 2; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC diff --git a/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/tests/fail/both_borrows/aliasing_mut3.tree.stderr index e92cad1777..73a5027646 100644 --- a/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -5,6 +5,7 @@ LL | *x = 1; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC diff --git a/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/tests/fail/both_borrows/aliasing_mut4.tree.stderr index e195b0a7e8..a6a6da3fa2 100644 --- a/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -5,6 +5,7 @@ LL | crate::intrinsics::write_via_move(dest, src); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index 30832ae60a..d4cfab024b 100644 --- a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -5,6 +5,7 @@ LL | *LEAK = 7; | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC diff --git a/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/tests/fail/both_borrows/box_noalias_violation.tree.stderr index d7b865d57a..3c8ec7f7d3 100644 --- a/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -5,6 +5,7 @@ LL | *y | ^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr b/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr index ad5df3399c..6588bc25df 100644 --- a/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr +++ b/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr @@ -5,6 +5,7 @@ LL | v2[1] = 7; | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC diff --git a/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr b/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr index 4ab49e75ad..6ef27515fc 100644 --- a/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr +++ b/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr @@ -5,6 +5,7 @@ LL | b[1] = 6; | ^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC diff --git a/tests/fail/both_borrows/illegal_write1.tree.stderr b/tests/fail/both_borrows/illegal_write1.tree.stderr index b718e19ff5..4ffc7a75e6 100644 --- a/tests/fail/both_borrows/illegal_write1.tree.stderr +++ b/tests/fail/both_borrows/illegal_write1.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { *x = 42 }; | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/illegal_write1.rs:LL:CC diff --git a/tests/fail/both_borrows/illegal_write5.tree.stderr b/tests/fail/both_borrows/illegal_write5.tree.stderr index d4c78c4bd3..fc5b12da70 100644 --- a/tests/fail/both_borrows/illegal_write5.tree.stderr +++ b/tests/fail/both_borrows/illegal_write5.tree.stderr @@ -5,6 +5,7 @@ LL | let _val = *xref; | ^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/illegal_write5.rs:LL:CC diff --git a/tests/fail/both_borrows/illegal_write6.tree.stderr b/tests/fail/both_borrows/illegal_write6.tree.stderr index e537bc18c0..6780e52c3b 100644 --- a/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { *y = 2 }; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index af90e75d38..90a89e48e6 100644 --- a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { *x = 0 }; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 5d5f5e59ea..8bac71dcd4 100644 --- a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { *x = 0 }; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Frozen) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/load_invalid_shr.tree.stderr b/tests/fail/both_borrows/load_invalid_shr.tree.stderr index 86c12603c0..e4bde2f7ae 100644 --- a/tests/fail/both_borrows/load_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/load_invalid_shr.tree.stderr @@ -5,6 +5,7 @@ LL | let _val = *xref_in_mem; | ^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC diff --git a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index 5f14f23e8d..f5c1dea69f 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -5,6 +5,7 @@ LL | *LEAK = 7; | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC diff --git a/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr b/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr index edc72b0abb..c1b0821a9f 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr @@ -5,6 +5,7 @@ LL | *raw1 = 3; | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC diff --git a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index 1984a6a074..aa07ef53b3 100644 --- a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -5,6 +5,7 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this deallocation (acting as a foreign write access) would cause the protected tag (currently Reserved (conflicted)) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/newtype_retagging.tree.stderr b/tests/fail/both_borrows/newtype_retagging.tree.stderr index 7bd0cd14d7..c8a72c5917 100644 --- a/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -5,6 +5,7 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this deallocation (acting as a foreign write access) would cause the protected tag (currently Reserved (conflicted)) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/both_borrows/outdated_local.tree.stderr b/tests/fail/both_borrows/outdated_local.tree.stderr index 8cb44d2635..5310f8b9d0 100644 --- a/tests/fail/both_borrows/outdated_local.tree.stderr +++ b/tests/fail/both_borrows/outdated_local.tree.stderr @@ -5,6 +5,7 @@ LL | assert_eq!(unsafe { *y }, 1); | ^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/outdated_local.rs:LL:CC diff --git a/tests/fail/both_borrows/pass_invalid_shr.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr.tree.stderr index 1bd760426d..3c813d3503 100644 --- a/tests/fail/both_borrows/pass_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr.tree.stderr @@ -5,6 +5,7 @@ LL | foo(xref); | ^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC diff --git a/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr index 2f999a8aae..4747c65ba8 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr @@ -5,6 +5,7 @@ LL | foo(some_xref); | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/pass_invalid_shr_option.rs:LL:CC diff --git a/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr b/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr index b30bda598d..da011cfd3f 100644 --- a/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr +++ b/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr @@ -5,6 +5,7 @@ LL | foo(pair_xref); | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/pass_invalid_shr_tuple.rs:LL:CC diff --git a/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/tests/fail/both_borrows/return_invalid_shr.tree.stderr index 2b2650a254..ee0f313d98 100644 --- a/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -5,6 +5,7 @@ LL | ret | ^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC diff --git a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index b8e963f87d..16110e5b06 100644 --- a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -5,6 +5,7 @@ LL | ret | ^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC diff --git a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index 8e499369f0..f93698f570 100644 --- a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -5,6 +5,7 @@ LL | ret | ^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC diff --git a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index a28754f541..d9b75f65f7 100644 --- a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -5,6 +5,7 @@ LL | *(x as *const i32 as *mut i32) = 7; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC diff --git a/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr b/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr index 0eb2dc3df7..c680c04137 100644 --- a/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr @@ -5,6 +5,7 @@ LL | let _val = *frozen; | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Frozen --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC diff --git a/tests/fail/both_borrows/zero-sized-protected.tree.stderr b/tests/fail/both_borrows/zero-sized-protected.tree.stderr index 2a9a9afb0f..66a7d7794e 100644 --- a/tests/fail/both_borrows/zero-sized-protected.tree.stderr +++ b/tests/fail/both_borrows/zero-sized-protected.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { dealloc(ptr, l) }; | ^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the allocation of the accessed tag (root of the allocation) also contains the strongly protected tag = help: the strongly protected tag disallows deallocations help: the accessed tag was created here diff --git a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index 2f1dc1988f..1995528e9f 100644 --- a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index 5db5a6cac4..e506a61c6b 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { ptr.read() }; | ^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index bae3819c97..33aad6ee17 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { ptr.read() }; | ^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign read access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index e0df9370fe..5cb36d9984 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index fa03ed6869..8c54017cba 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -5,6 +5,7 @@ LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Active) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/tree_borrows/alternate-read-write.stderr b/tests/fail/tree_borrows/alternate-read-write.stderr index 63c6287f20..9e955a6d5b 100644 --- a/tests/fail/tree_borrows/alternate-read-write.stderr +++ b/tests/fail/tree_borrows/alternate-read-write.stderr @@ -5,6 +5,7 @@ LL | *y += 1; // Failure | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/alternate-read-write.rs:LL:CC diff --git a/tests/fail/tree_borrows/cell-inside-struct.stderr b/tests/fail/tree_borrows/cell-inside-struct.stderr index 81d5aba6b2..5e43d174ed 100644 --- a/tests/fail/tree_borrows/cell-inside-struct.stderr +++ b/tests/fail/tree_borrows/cell-inside-struct.stderr @@ -11,6 +11,7 @@ LL | (*a).field1 = 88; | ^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (a) has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Cell --> tests/fail/tree_borrows/cell-inside-struct.rs:LL:CC diff --git a/tests/fail/tree_borrows/error-range.stderr b/tests/fail/tree_borrows/error-range.stderr index 9a52f68d9b..3dc120a20d 100644 --- a/tests/fail/tree_borrows/error-range.stderr +++ b/tests/fail/tree_borrows/error-range.stderr @@ -5,6 +5,7 @@ LL | rmut[5] += 1; | ^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child read access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/error-range.rs:LL:CC diff --git a/tests/fail/tree_borrows/fnentry_invalidation.stderr b/tests/fail/tree_borrows/fnentry_invalidation.stderr index ed345aae38..7886029dcc 100644 --- a/tests/fail/tree_borrows/fnentry_invalidation.stderr +++ b/tests/fail/tree_borrows/fnentry_invalidation.stderr @@ -5,6 +5,7 @@ LL | *z = 2; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/fnentry_invalidation.rs:LL:CC diff --git a/tests/fail/tree_borrows/outside-range.stderr b/tests/fail/tree_borrows/outside-range.stderr index bbd33dc356..7960f42faa 100644 --- a/tests/fail/tree_borrows/outside-range.stderr +++ b/tests/fail/tree_borrows/outside-range.stderr @@ -5,6 +5,7 @@ LL | *y.add(3) = 42; | ^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is foreign to the protected tag (i.e., it is not a child) = help: this foreign write access would cause the protected tag (currently Reserved) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr b/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr index a4119bc017..2edbbd8056 100644 --- a/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr +++ b/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr @@ -5,6 +5,7 @@ LL | *ptr = 0; | ^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Frozen which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/parent_read_freezes_raw_mut.rs:LL:CC diff --git a/tests/fail/tree_borrows/pass_invalid_mut.stderr b/tests/fail/tree_borrows/pass_invalid_mut.stderr index de01a9f0e8..c00c67173b 100644 --- a/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -5,6 +5,7 @@ LL | *nope = 31; | ^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here diff --git a/tests/fail/tree_borrows/protector-write-lazy.stderr b/tests/fail/tree_borrows/protector-write-lazy.stderr index af226b9e3b..7cebd7f32a 100644 --- a/tests/fail/tree_borrows/protector-write-lazy.stderr +++ b/tests/fail/tree_borrows/protector-write-lazy.stderr @@ -5,6 +5,7 @@ LL | unsafe { println!("Value of funky: {}", *funky_ptr_lazy_on_fst_elem) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/protector-write-lazy.rs:LL:CC diff --git a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 8421df5ab7..012d7caef5 100644 --- a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -5,6 +5,7 @@ LL | *(x as *mut u8).byte_sub(1) = 42; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC diff --git a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index 00d5c3e6b6..b1c3ffe86e 100644 --- a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -15,6 +15,7 @@ LL | *y = 1; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (y, callee:y, caller:y) is foreign to the protected tag (callee:x) (i.e., it is not a child) = help: this foreign write access would cause the protected tag (callee:x) (currently Reserved) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/tests/fail/tree_borrows/reserved/int-protected-write.stderr index c003938db3..5f3129b9dc 100644 --- a/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -15,6 +15,7 @@ LL | *y = 0; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag (y, callee:y, caller:y) is foreign to the protected tag (callee:x) (i.e., it is not a child) = help: this foreign write access would cause the protected tag (callee:x) (currently Reserved) to become Disabled = help: protected tags must never be Disabled diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index a8db707033..7565fa6203 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -19,6 +19,7 @@ LL | unsafe { *y = 13 } | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index 5eeefd450c..7f791c88dd 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -19,6 +19,7 @@ LL | unsafe { *y = 13 } | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC diff --git a/tests/fail/tree_borrows/return_invalid_mut.stderr b/tests/fail/tree_borrows/return_invalid_mut.stderr index a0ebf0ecbd..ba8ab47287 100644 --- a/tests/fail/tree_borrows/return_invalid_mut.stderr +++ b/tests/fail/tree_borrows/return_invalid_mut.stderr @@ -5,6 +5,7 @@ LL | *ret = 3; | ^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here diff --git a/tests/fail/tree_borrows/spurious_read.stderr b/tests/fail/tree_borrows/spurious_read.stderr index a3b0d5f13a..8f2534d6b6 100644 --- a/tests/fail/tree_borrows/spurious_read.stderr +++ b/tests/fail/tree_borrows/spurious_read.stderr @@ -18,6 +18,7 @@ LL | *y = 2; | ^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Reserved (conflicted) which forbids this child write access help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/spurious_read.rs:LL:CC diff --git a/tests/fail/tree_borrows/strongly-protected.stderr b/tests/fail/tree_borrows/strongly-protected.stderr index 56617f6d6a..685abee329 100644 --- a/tests/fail/tree_borrows/strongly-protected.stderr +++ b/tests/fail/tree_borrows/strongly-protected.stderr @@ -5,6 +5,7 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the allocation of the accessed tag also contains the strongly protected tag = help: the strongly protected tag disallows deallocations help: the accessed tag was created here diff --git a/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr b/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr index 8669a14ecc..b98d2fafcf 100644 --- a/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr +++ b/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr @@ -5,6 +5,7 @@ LL | *m = 42; | ^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag is a child of the conflicting tag = help: the conflicting tag has state Frozen which forbids this child write access help: the accessed tag was created here diff --git a/tests/fail/tree_borrows/write-during-2phase.stderr b/tests/fail/tree_borrows/write-during-2phase.stderr index 693d185355..7f55e06a6b 100644 --- a/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/tests/fail/tree_borrows/write-during-2phase.stderr @@ -5,6 +5,7 @@ LL | fn add(&mut self, n: u64) -> u64 { | ^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: the accessed tag has state Disabled which forbids this reborrow (acting as a child read access) help: the accessed tag was created here, in the initial state Reserved --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC