11error[E0080]: evaluation of constant value failed
2- --> $DIR/detect-extra-ub.rs:7 :20
2+ --> $DIR/detect-extra-ub.rs:9 :20
33 |
44LL | let _x: bool = transmute(3u8);
55 | ^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
66
77error[E0080]: evaluation of constant value failed
8- --> $DIR/detect-extra-ub.rs:13 :21
8+ --> $DIR/detect-extra-ub.rs:15 :21
99 |
1010LL | let _x: usize = transmute(&3u8);
1111 | ^^^^^^^^^^^^^^^ constructing invalid value: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
1212
1313error[E0080]: evaluation of constant value failed
14- --> $DIR/detect-extra-ub.rs:20 :30
14+ --> $DIR/detect-extra-ub.rs:22 :30
1515 |
1616LL | let _x: (usize, usize) = transmute(x);
1717 | ^^^^^^^^^^^^ constructing invalid value at .0: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
1818
1919error[E0080]: evaluation of constant value failed
20- --> $DIR/detect-extra-ub.rs:26 :20
20+ --> $DIR/detect-extra-ub.rs:28 :20
2121 |
2222LL | let _x: &u32 = transmute(&[0u8; 4]);
2323 | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 4 byte alignment but found 1)
@@ -36,13 +36,13 @@ LL | copy_nonoverlapping(src, tmp.as_mut_ptr(), 1);
3636LL | unsafe { read(self) }
3737 | ---------- inside `ptr::const_ptr::<impl *const u32>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
3838 |
39- ::: $DIR/detect-extra-ub.rs:39 :9
39+ ::: $DIR/detect-extra-ub.rs:41 :9
4040 |
4141LL | ptr.read();
42- | ---------- inside `INNER` at $DIR/detect-extra-ub.rs:39 :9
42+ | ---------- inside `INNER` at $DIR/detect-extra-ub.rs:41 :9
4343
4444error: any use of this value will cause an error
45- --> $DIR/detect-extra-ub.rs:32 :5
45+ --> $DIR/detect-extra-ub.rs:34 :5
4646 |
4747LL | const UNALIGNED_READ: () = {
4848 | ------------------------
@@ -58,7 +58,7 @@ error: aborting due to 6 previous errors
5858For more information about this error, try `rustc --explain E0080`.
5959Future incompatibility report: Future breakage diagnostic:
6060error: any use of this value will cause an error
61- --> $DIR/detect-extra-ub.rs:32 :5
61+ --> $DIR/detect-extra-ub.rs:34 :5
6262 |
6363LL | const UNALIGNED_READ: () = {
6464 | ------------------------
0 commit comments