diff options
Diffstat (limited to 'tests/ui/structs/default-field-values')
5 files changed, 11 insertions, 11 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 } diff --git a/tests/ui/structs/default-field-values/invalid-const.stderr b/tests/ui/structs/default-field-values/invalid-const.stderr index 030bdbfcc3e..93f08c4c562 100644 --- a/tests/ui/structs/default-field-values/invalid-const.stderr +++ b/tests/ui/structs/default-field-values/invalid-const.stderr @@ -1,14 +1,14 @@ -error[E0080]: evaluation of constant value failed +error[E0080]: evaluation panicked: asdf --> $DIR/invalid-const.rs:5:19 | LL | pub bax: u8 = panic!("asdf"), - | ^^^^^^^^^^^^^^ evaluation panicked: asdf + | ^^^^^^^^^^^^^^ evaluation of constant value failed -error[E0080]: evaluation of `Baz::<C>::bat::{constant#0}` failed +error[E0080]: attempt to compute `130_u8 + 130_u8`, which would overflow --> $DIR/invalid-const.rs:11:19 | LL | pub bat: u8 = 130 + 130, - | ^^^^^^^^^ attempt to compute `130_u8 + 130_u8`, which would overflow + | ^^^^^^^^^ evaluation of `Baz::<C>::bat::{constant#0}` failed error: aborting due to 2 previous errors diff --git a/tests/ui/structs/default-field-values/post-mono.direct.stderr b/tests/ui/structs/default-field-values/post-mono.direct.stderr index cdd80620c48..f177f1e7bbc 100644 --- a/tests/ui/structs/default-field-values/post-mono.direct.stderr +++ b/tests/ui/structs/default-field-values/post-mono.direct.stderr @@ -1,8 +1,8 @@ -error[E0080]: evaluation of `Z::<1>::post_mono::{constant#0}` failed +error[E0080]: attempt to divide `1_usize` by zero --> $DIR/post-mono.rs:7:24 | LL | post_mono: usize = X / 0, - | ^^^^^ attempt to divide `1_usize` by zero + | ^^^^^ evaluation of `Z::<1>::post_mono::{constant#0}` failed note: erroneous constant encountered --> $DIR/post-mono.rs:17:19 diff --git a/tests/ui/structs/default-field-values/post-mono.indirect.stderr b/tests/ui/structs/default-field-values/post-mono.indirect.stderr index 56c27a6e5dc..574f539659b 100644 --- a/tests/ui/structs/default-field-values/post-mono.indirect.stderr +++ b/tests/ui/structs/default-field-values/post-mono.indirect.stderr @@ -1,8 +1,8 @@ -error[E0080]: evaluation of `Z::<1>::post_mono::{constant#0}` failed +error[E0080]: attempt to divide `1_usize` by zero --> $DIR/post-mono.rs:7:24 | LL | post_mono: usize = X / 0, - | ^^^^^ attempt to divide `1_usize` by zero + | ^^^^^ evaluation of `Z::<1>::post_mono::{constant#0}` failed note: erroneous constant encountered --> $DIR/post-mono.rs:12:19 diff --git a/tests/ui/structs/default-field-values/post-mono.rs b/tests/ui/structs/default-field-values/post-mono.rs index 4de31f6e2fb..68dfa391bb4 100644 --- a/tests/ui/structs/default-field-values/post-mono.rs +++ b/tests/ui/structs/default-field-values/post-mono.rs @@ -5,7 +5,7 @@ struct Z<const X: usize> { post_mono: usize = X / 0, - //~^ ERROR evaluation of `Z::<1>::post_mono::{constant#0}` failed + //~^ ERROR attempt to divide `1_usize` by zero } fn indirect<const X: usize>() { |
