diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-05-30 14:06:35 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-02 15:37:15 +0000 |
| commit | 020216c31c1e4f1f56a689df8f04580504354613 (patch) | |
| tree | 5e771521237db35d4e4a0abf057f3bf4c5f55880 /tests/ui/statics | |
| parent | b331b8b96d86a6433df957a3cc49ed51f3656135 (diff) | |
| download | rust-020216c31c1e4f1f56a689df8f04580504354613.tar.gz rust-020216c31c1e4f1f56a689df8f04580504354613.zip | |
Clarify why we are talking about a failed const eval at a random place
Diffstat (limited to 'tests/ui/statics')
| -rw-r--r-- | tests/ui/statics/issue-14227.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/statics/uninhabited-static.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/statics/issue-14227.stderr b/tests/ui/statics/issue-14227.stderr index 119e70e7b23..372a06ae1ed 100644 --- a/tests/ui/statics/issue-14227.stderr +++ b/tests/ui/statics/issue-14227.stderr @@ -2,7 +2,7 @@ error[E0080]: cannot access extern static `symbol` --> $DIR/issue-14227.rs:4:21 | LL | static CRASH: u32 = symbol; - | ^^^^^^ could not evaluate static initializer + | ^^^^^^ evaluation of static initializer failed here error[E0133]: use of extern static is unsafe and requires unsafe function or block --> $DIR/issue-14227.rs:4:21 diff --git a/tests/ui/statics/uninhabited-static.stderr b/tests/ui/statics/uninhabited-static.stderr index e285df0c7ed..60268ad3562 100644 --- a/tests/ui/statics/uninhabited-static.stderr +++ b/tests/ui/statics/uninhabited-static.stderr @@ -47,13 +47,13 @@ error[E0080]: constructing invalid value: encountered a value of uninhabited typ --> $DIR/uninhabited-static.rs:12:31 | LL | static VOID2: Void = unsafe { std::mem::transmute(()) }; - | ^^^^^^^^^^^^^^^^^^^^^^^ could not evaluate static initializer + | ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void` --> $DIR/uninhabited-static.rs:15:32 | LL | static NEVER2: Void = unsafe { std::mem::transmute(()) }; - | ^^^^^^^^^^^^^^^^^^^^^^^ could not evaluate static initializer + | ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of static initializer failed here error: aborting due to 6 previous errors |
