46 lines
2.0 KiB
Plaintext
46 lines
2.0 KiB
Plaintext
|
|
warning: lint `default_field_always_invalid_const` can't be warned on
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:4:8
|
||
|
|
|
|
||
|
|
LL | #[warn(default_field_always_invalid_const)]
|
||
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ either `deny` or `allow`, no other lint level is supported for this lint
|
||
|
|
|
||
|
|
error[E0080]: evaluation of constant value failed
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:6:19
|
||
|
|
|
|
||
|
|
LL | pub bax: u8 = panic!("asdf"),
|
||
|
|
| ^^^^^^^^^^^^^^ the evaluated program panicked at 'asdf', $DIR/default-field-values-invalid-const.rs:6:19
|
||
|
|
|
|
||
|
|
= 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)
|
||
|
|
|
||
|
|
warning: default field fails const-evaluation
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:6:5
|
||
|
|
|
|
||
|
|
LL | pub bax: u8 = panic!("asdf"),
|
||
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this field's constant fails const-evaluation, as seen in the previous error
|
||
|
|
|
|
||
|
|
= help: you can skip const-evaluation of default fields by enabling this lint
|
||
|
|
note: the lint level is defined here
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:4:8
|
||
|
|
|
|
||
|
|
LL | #[warn(default_field_always_invalid_const)]
|
||
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
|
error[E0080]: evaluation of `Baz::<C>::bat::{constant#0}` failed
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:13:19
|
||
|
|
|
|
||
|
|
LL | pub bat: u8 = 130 + 130,
|
||
|
|
| ^^^^^^^^^ attempt to compute `130_u8 + 130_u8`, which would overflow
|
||
|
|
|
||
|
|
error: default field fails const-evaluation
|
||
|
|
--> $DIR/default-field-values-invalid-const.rs:13:5
|
||
|
|
|
|
||
|
|
LL | pub bat: u8 = 130 + 130,
|
||
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ this field's constant fails const-evaluation, as seen in the previous error
|
||
|
|
|
|
||
|
|
= help: you can skip const-evaluation of default fields by enabling this lint
|
||
|
|
= note: `#[deny(default_field_always_invalid_const)]` on by default
|
||
|
|
|
||
|
|
error: aborting due to 3 previous errors; 2 warnings emitted
|
||
|
|
|
||
|
|
For more information about this error, try `rustc --explain E0080`.
|