about summary refs log tree commit diff
path: root/tests/ui/generic-const-items
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-14 12:28:07 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-19 22:11:13 +0000
commit90626979170da2d6c5ec1622b3d7a9512df9eb71 (patch)
tree760826399d3140baa9e10b3316c73cfdc87930bb /tests/ui/generic-const-items
parente29a1530f670d66f617f7aac8601920a87263ac6 (diff)
downloadrust-90626979170da2d6c5ec1622b3d7a9512df9eb71.tar.gz
rust-90626979170da2d6c5ec1622b3d7a9512df9eb71.zip
Always evaluate free constants and statics, even if previous errors occurred
Diffstat (limited to 'tests/ui/generic-const-items')
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs2
-rw-r--r--tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr13
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
index dd00b327d2d..93f01c9577c 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs
@@ -3,7 +3,7 @@
 
 // Ensure that we check if trivial bounds on const items hold or not.
 
-const UNUSABLE: () = ()
+const UNUSABLE: () = () //~ ERROR evaluation of constant value failed
 where
     String: Copy;
 
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 942e5dbd88e..407682fee56 100644
--- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
+++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr
@@ -1,3 +1,11 @@
+error[E0080]: evaluation of constant value failed
+  --> $DIR/trivially-unsatisfied-bounds-0.rs:6:1
+   |
+LL | / const UNUSABLE: () = ()
+LL | | where
+LL | |     String: Copy;
+   | |_________________^ entering unreachable code
+
 error[E0277]: the trait bound `String: Copy` is not satisfied
   --> $DIR/trivially-unsatisfied-bounds-0.rs:11:13
    |
@@ -13,6 +21,7 @@ LL | where
 LL |     String: Copy;
    |             ^^^^ required by this bound in `UNUSABLE`
 
-error: aborting due to 1 previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0080, E0277.
+For more information about an error, try `rustc --explain E0080`.