about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-09-11 23:09:11 +0200
committerRalf Jung <post@ralfj.de>2023-09-14 22:34:05 +0200
commit3226e4b01089b4e8e8d474a8d498bb0c68e76ed2 (patch)
treef06e07cc04ae310280122d3217992b875c04b533
parent1d49cb6118c346871f85dc3a0e7bb3330b09687b (diff)
downloadrust-3226e4b01089b4e8e8d474a8d498bb0c68e76ed2.tar.gz
rust-3226e4b01089b4e8e8d474a8d498bb0c68e76ed2.zip
don't point at const usage site for resolution-time errors
also share the code that emits the actual error
-rw-r--r--tests/ui-toml/suppress_lint_in_const/test.stderr2
-rw-r--r--tests/ui/indexing_slicing_index.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui-toml/suppress_lint_in_const/test.stderr b/tests/ui-toml/suppress_lint_in_const/test.stderr
index d14974faffa..f8ace799593 100644
--- a/tests/ui-toml/suppress_lint_in_const/test.stderr
+++ b/tests/ui-toml/suppress_lint_in_const/test.stderr
@@ -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.
diff --git a/tests/ui/indexing_slicing_index.stderr b/tests/ui/indexing_slicing_index.stderr
index 64facf20803..1c34875d2b8 100644
--- a/tests/ui/indexing_slicing_index.stderr
+++ b/tests/ui/indexing_slicing_index.stderr
@@ -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()] };