rust/tests/ui/consts/const-eval/ub-invalid-values.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
617 B
Plaintext
Raw Normal View History

2024-06-11 06:28:36 -05:00
error[E0080]: evaluation of constant value failed
--> $DIR/ub-invalid-values.rs:2:16
|
LL | let _val = *ptr as u32;
| ^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x03
|
note: inside `bool_cast`
--> $DIR/ub-invalid-values.rs:2:16
|
LL | let _val = *ptr as u32;
| ^^^^^^^^^^^
note: inside `_`
--> $DIR/ub-invalid-values.rs:8:5
|
LL | bool_cast(&v as *const u8 as *const bool);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0080`.