|
1 | | -warning: lint `default_field_always_invalid_const` can't be warned on |
2 | | - --> $DIR/default-field-values-invalid-const.rs:4:8 |
3 | | - | |
4 | | -LL | #[warn(default_field_always_invalid_const)] |
5 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ either `deny` or `allow`, no other lint level is supported for this lint |
6 | | - |
7 | 1 | error[E0080]: evaluation of constant value failed |
8 | | - --> $DIR/default-field-values-invalid-const.rs:6:19 |
| 2 | + --> $DIR/default-field-values-invalid-const.rs:5:19 |
9 | 3 | | |
10 | 4 | LL | pub bax: u8 = panic!("asdf"), |
11 | | - | ^^^^^^^^^^^^^^ the evaluated program panicked at 'asdf', $DIR/default-field-values-invalid-const.rs:6:19 |
| 5 | + | ^^^^^^^^^^^^^^ the evaluated program panicked at 'asdf', $DIR/default-field-values-invalid-const.rs:5:19 |
12 | 6 | | |
13 | 7 | = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) |
14 | 8 |
|
15 | | -warning: default field fails const-evaluation |
16 | | - --> $DIR/default-field-values-invalid-const.rs:6:5 |
17 | | - | |
18 | | -LL | pub bax: u8 = panic!("asdf"), |
19 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this field's constant fails const-evaluation, as seen in the previous error |
20 | | - | |
21 | | - = help: you can skip const-evaluation of default fields by enabling this lint |
22 | | -note: the lint level is defined here |
23 | | - --> $DIR/default-field-values-invalid-const.rs:4:8 |
24 | | - | |
25 | | -LL | #[warn(default_field_always_invalid_const)] |
26 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
27 | | - |
28 | 9 | error[E0080]: evaluation of `Baz::<C>::bat::{constant#0}` failed |
29 | | - --> $DIR/default-field-values-invalid-const.rs:13:19 |
| 10 | + --> $DIR/default-field-values-invalid-const.rs:11:19 |
30 | 11 | | |
31 | 12 | LL | pub bat: u8 = 130 + 130, |
32 | 13 | | ^^^^^^^^^ attempt to compute `130_u8 + 130_u8`, which would overflow |
33 | 14 |
|
34 | | -error: default field fails const-evaluation |
35 | | - --> $DIR/default-field-values-invalid-const.rs:13:5 |
36 | | - | |
37 | | -LL | pub bat: u8 = 130 + 130, |
38 | | - | ^^^^^^^^^^^^^^^^^^^^^^^ this field's constant fails const-evaluation, as seen in the previous error |
39 | | - | |
40 | | - = help: you can skip const-evaluation of default fields by enabling this lint |
41 | | - = note: `#[deny(default_field_always_invalid_const)]` on by default |
42 | | - |
43 | | -error: aborting due to 3 previous errors; 2 warnings emitted |
| 15 | +error: aborting due to 2 previous errors |
44 | 16 |
|
45 | 17 | For more information about this error, try `rustc --explain E0080`. |
0 commit comments