don't point at const usage site for resolution-time errors
also share the code that emits the actual error
This commit is contained in:
parent
1d49cb6118
commit
3226e4b010
@ -4,7 +4,7 @@ error[E0080]: evaluation of `main::{constant#3}` failed
|
||||
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
|
||||
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
|
||||
|
||||
note: erroneous constant used
|
||||
note: erroneous constant encountered
|
||||
--> $DIR/test.rs:37:5
|
||||
|
|
||||
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
|
||||
|
@ -24,7 +24,7 @@ error[E0080]: evaluation of `main::{constant#3}` failed
|
||||
LL | const { &ARR[idx4()] };
|
||||
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
|
||||
|
||||
note: erroneous constant used
|
||||
note: erroneous constant encountered
|
||||
--> $DIR/indexing_slicing_index.rs:48:5
|
||||
|
|
||||
LL | const { &ARR[idx4()] };
|
||||
|
Loading…
Reference in New Issue
Block a user