Skip to content

Commit 3226e4b

Browse files
committed
don't point at const usage site for resolution-time errors
also share the code that emits the actual error
1 parent 1d49cb6 commit 3226e4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/ui-toml/suppress_lint_in_const/test.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of `main::{constant#3}` failed
44
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
55
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
66

7-
note: erroneous constant used
7+
note: erroneous constant encountered
88
--> $DIR/test.rs:37:5
99
|
1010
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.

tests/ui/indexing_slicing_index.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ error[E0080]: evaluation of `main::{constant#3}` failed
2424
LL | const { &ARR[idx4()] };
2525
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
2626

27-
note: erroneous constant used
27+
note: erroneous constant encountered
2828
--> $DIR/indexing_slicing_index.rs:48:5
2929
|
3030
LL | const { &ARR[idx4()] };

0 commit comments

Comments
 (0)