about summary refs log tree commit diff
path: root/tests/ui/generic-const-items
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-06-07 11:32:09 +0200
committerRalf Jung <post@ralfj.de>2025-06-07 13:42:30 +0200
commit17946c22b1d7abd2dd990bf6998c8491b534fe62 (patch)
tree3483beea28e6753a04055cc17a0145e77b036b30 /tests/ui/generic-const-items
parent1dc9ae6d104205f194d84643d13fd01904a0010d (diff)
downloadrust-17946c22b1d7abd2dd990bf6998c8491b534fe62.tar.gz
rust-17946c22b1d7abd2dd990bf6998c8491b534fe62.zip
const-eval error: always say in which item the error occurred
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
Diffstat (limited to 'tests/ui/generic-const-items')
-rw-r--r--tests/ui/generic-const-items/def-site-eval.fail.stderr2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/generic-const-items/def-site-eval.fail.stderr b/tests/ui/generic-const-items/def-site-eval.fail.stderr
index b8616547390..e39fbdf7802 100644
--- a/tests/ui/generic-const-items/def-site-eval.fail.stderr
+++ b/tests/ui/generic-const-items/def-site-eval.fail.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation panicked: explicit panic
   --> $DIR/def-site-eval.rs:13:20
    |
 LL | const _<'_a>: () = panic!();
-   |                    ^^^^^^^^ evaluation of constant value failed here
+   |                    ^^^^^^^^ evaluation of `_` failed here
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
index a89356fadfd..e5c3bbb0c7d 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
@@ -4,7 +4,7 @@ error[E0080]: entering unreachable code
 LL | / const UNUSABLE: () = ()
 LL | | where
 LL | |     String: Copy;
-   | |_________________^ evaluation of constant value failed here
+   | |_________________^ evaluation of `UNUSABLE` failed here
 
 error[E0277]: the trait bound `String: Copy` is not satisfied
   --> $DIR/trivially-unsatisfied-bounds-0.rs:11:13
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
index 3aa26eb1656..a5f6dd980bd 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr
@@ -4,7 +4,7 @@ error[E0080]: entering unreachable code
 LL | / const UNUSED: () = ()
 LL | | where
 LL | |     String: Copy;
-   | |_________________^ evaluation of constant value failed here
+   | |_________________^ evaluation of `UNUSED` failed here
 
 error: aborting due to 1 previous error