Skip to content

Commit d6dd8a9

Browse files
committed
Adjust stderr for #1971
1 parent 08d4fdd commit d6dd8a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+219
-90
lines changed

tests/ui/box-cell-alias.stderr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: trying to reborrow for SharedReadWrite at alloc978, but parent tag <2075> does not have an appropriate item in the borrow stack
1+
error: Undefined Behavior: trying to reborrow <2075> for SharedReadWrite permission at alloc978[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/box-cell-alias.rs:9:14
33
|
4-
9 | unsafe { (*ptr).set(20); } //~ ERROR does not have an appropriate item in the borrow stack
5-
| ^^^^^^^^^^^^^^ trying to reborrow for SharedReadWrite at alloc978, but parent tag <2075> does not have an appropriate item in the borrow stack
4+
9 | unsafe { (*ptr).set(20); } //~ ERROR does not exist in the borrow stack
5+
| ^^^^^^^^^^^^^^
6+
| |
7+
| trying to reborrow <2075> for SharedReadWrite permission at alloc978[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of a reborrow at alloc978[0x0..0x1]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/alias_through_mutation.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1912> at alloc955 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1912> at alloc955[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/alias_through_mutation.rs:12:16
33
|
44
12 | let _val = *target_alias; //~ ERROR borrow stack
5-
| ^^^^^^^^^^^^^ no item granting read access to tag <1912> at alloc955 found in borrow stack.
5+
| ^^^^^^^^^^^^^
6+
| |
7+
| attempting a read access using <1912> at alloc955[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc955[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/aliasing_mut3.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: trying to reborrow for SharedReadOnly at alloc954, but parent tag <untagged> does not have an appropriate item in the borrow stack
1+
error: Undefined Behavior: trying to reborrow <untagged> for SharedReadOnly permission at alloc954[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/aliasing_mut3.rs:3:1
33
|
44
3 | pub fn safe(_x: &mut i32, _y: &i32) {} //~ ERROR borrow stack
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to reborrow for SharedReadOnly at alloc954, but parent tag <untagged> does not have an appropriate item in the borrow stack
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
| |
7+
| trying to reborrow <untagged> for SharedReadOnly permission at alloc954[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of a reborrow at alloc954[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/box_exclusive_violation1.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1990> at alloc970 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1990> at alloc970[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/box_exclusive_violation1.rs:11:3
33
|
44
11 | *our //~ ERROR borrow stack
5-
| ^^^^ no item granting read access to tag <1990> at alloc970 found in borrow stack.
5+
| ^^^^
6+
| |
7+
| attempting a read access using <1990> at alloc970[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc970[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/buggy_as_mut_slice.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting write access to tag <2098> at alloc967+0x4 found in borrow stack.
1+
error: Undefined Behavior: attempting a write access using <2098> at alloc967[0x4], but that tag does not exist in the borrow stack for this location
22
--> $DIR/buggy_as_mut_slice.rs:15:5
33
|
44
15 | v1[1] = 5;
5-
| ^^^^^^^^^ no item granting write access to tag <2098> at alloc967+0x4 found in borrow stack.
5+
| ^^^^^^^^^
6+
| |
7+
| attempting a write access using <2098> at alloc967[0x4], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc967[0x4..0x8]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/buggy_split_at_mut.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: trying to reborrow for Unique at alloc953, but parent tag <1931> does not have an appropriate item in the borrow stack
1+
error: Undefined Behavior: trying to reborrow <1931> for Unique permission at alloc953[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/buggy_split_at_mut.rs:19:10
33
|
44
19 | let (a, b) = safe::split_at_mut(&mut array, 0);
5-
| ^ trying to reborrow for Unique at alloc953, but parent tag <1931> does not have an appropriate item in the borrow stack
5+
| ^
6+
| |
7+
| trying to reborrow <1931> for Unique permission at alloc953[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of a reborrow at alloc953[0x0..0x10]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/illegal_read1.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1903> at alloc953 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/illegal_read1.rs:9:16
33
|
44
9 | let _val = *xref; // ...but any use of raw will invalidate our ref.
5-
| ^^^^^ no item granting read access to tag <1903> at alloc953 found in borrow stack.
5+
| ^^^^^
6+
| |
7+
| attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc953[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/illegal_read2.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1903> at alloc953 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/illegal_read2.rs:9:16
33
|
44
9 | let _val = *xref; // ...but any use of raw will invalidate our ref.
5-
| ^^^^^ no item granting read access to tag <1903> at alloc953 found in borrow stack.
5+
| ^^^^^
6+
| |
7+
| attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc953[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/illegal_read3.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1925> at alloc953 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1925> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/illegal_read3.rs:17:16
33
|
44
17 | let _val = *xref2;
5-
| ^^^^^^ no item granting read access to tag <1925> at alloc953 found in borrow stack.
5+
| ^^^^^^
6+
| |
7+
| attempting a read access using <1925> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc953[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

tests/ui/stacked_borrows/illegal_read4.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error: Undefined Behavior: no item granting read access to tag <1903> at alloc953 found in borrow stack.
1+
error: Undefined Behavior: attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
22
--> $DIR/illegal_read4.rs:8:20
33
|
44
8 | let _illegal = *xref2; //~ ERROR borrow stack
5-
| ^^^^^^ no item granting read access to tag <1903> at alloc953 found in borrow stack.
5+
| ^^^^^^
6+
| |
7+
| attempting a read access using <1903> at alloc953[0x0], but that tag does not exist in the borrow stack for this location
8+
| this error occurs as part of an access at alloc953[0x0..0x4]
69
|
710
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
811
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

0 commit comments

Comments
 (0)