diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-05-28 10:29:08 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-02 15:37:15 +0000 |
| commit | b331b8b96d86a6433df957a3cc49ed51f3656135 (patch) | |
| tree | 72e20ae9fa73a475719589593a790156181e4e24 /tests/rustdoc-ui | |
| parent | e6152cdf5b31bd844a4cc1049433859d54863602 (diff) | |
| download | rust-b331b8b96d86a6433df957a3cc49ed51f3656135.tar.gz rust-b331b8b96d86a6433df957a3cc49ed51f3656135.zip | |
Use the informative error as the main const eval error message
Diffstat (limited to 'tests/rustdoc-ui')
| -rw-r--r-- | tests/rustdoc-ui/const-evalutation-ice.rs | 4 | ||||
| -rw-r--r-- | tests/rustdoc-ui/const-evalutation-ice.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/rustdoc-ui/const-evalutation-ice.rs b/tests/rustdoc-ui/const-evalutation-ice.rs index 0dd3bcaa289..72bcbeb4c51 100644 --- a/tests/rustdoc-ui/const-evalutation-ice.rs +++ b/tests/rustdoc-ui/const-evalutation-ice.rs @@ -4,8 +4,8 @@ use std::cell::Cell; use std::mem; pub struct S { - s: Cell<usize> + s: Cell<usize>, } pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize; -//~^ ERROR evaluation of constant value failed +//~^ ERROR overflow diff --git a/tests/rustdoc-ui/const-evalutation-ice.stderr b/tests/rustdoc-ui/const-evalutation-ice.stderr index e1cb3323856..7fb78b6a028 100644 --- a/tests/rustdoc-ui/const-evalutation-ice.stderr +++ b/tests/rustdoc-ui/const-evalutation-ice.stderr @@ -1,8 +1,8 @@ -error[E0080]: evaluation of constant value failed +error[E0080]: attempt to compute `0_usize - 1_usize`, which would overflow --> $DIR/const-evalutation-ice.rs:10:22 | LL | pub const N: usize = 0 - (mem::size_of::<S>() != 400) as usize; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of constant value failed error: aborting due to 1 previous error |
