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/ui/structs/default-field-values/invalid-const.rs | |
| 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/ui/structs/default-field-values/invalid-const.rs')
| -rw-r--r-- | tests/ui/structs/default-field-values/invalid-const.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/structs/default-field-values/invalid-const.rs b/tests/ui/structs/default-field-values/invalid-const.rs index 203a712868b..ddb73f68865 100644 --- a/tests/ui/structs/default-field-values/invalid-const.rs +++ b/tests/ui/structs/default-field-values/invalid-const.rs @@ -3,13 +3,13 @@ pub struct Bat { pub bax: u8 = panic!("asdf"), - //~^ ERROR evaluation of constant value failed + //~^ ERROR evaluation panicked: asdf } pub struct Baz<const C: u8> { pub bax: u8 = 130 + C, // ok pub bat: u8 = 130 + 130, - //~^ ERROR evaluation of `Baz::<C>::bat::{constant#0}` failed + //~^ ERROR attempt to compute `130_u8 + 130_u8`, which would overflow pub bay: u8 = 1, // ok } |
