1
1
error[E0080]: evaluation of constant value failed
2
- --> $DIR/detect-extra-ub.rs:7 :20
2
+ --> $DIR/detect-extra-ub.rs:9 :20
3
3
|
4
4
LL | let _x: bool = transmute(3u8);
5
5
| ^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
6
6
7
7
error[E0080]: evaluation of constant value failed
8
- --> $DIR/detect-extra-ub.rs:13 :21
8
+ --> $DIR/detect-extra-ub.rs:15 :21
9
9
|
10
10
LL | let _x: usize = transmute(&3u8);
11
11
| ^^^^^^^^^^^^^^^ constructing invalid value: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
12
12
13
13
error[E0080]: evaluation of constant value failed
14
- --> $DIR/detect-extra-ub.rs:20 :30
14
+ --> $DIR/detect-extra-ub.rs:22 :30
15
15
|
16
16
LL | let _x: (usize, usize) = transmute(x);
17
17
| ^^^^^^^^^^^^ constructing invalid value at .0: encountered (potentially part of) a pointer, but expected plain (non-pointer) bytes
18
18
19
19
error[E0080]: evaluation of constant value failed
20
- --> $DIR/detect-extra-ub.rs:26 :20
20
+ --> $DIR/detect-extra-ub.rs:28 :20
21
21
|
22
22
LL | let _x: &u32 = transmute(&[0u8; 4]);
23
23
| ^^^^^^^^^^^^^^^^^^^^ 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);
36
36
LL | unsafe { read(self) }
37
37
| ---------- inside `ptr::const_ptr::<impl *const u32>::read` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
38
38
|
39
- ::: $DIR/detect-extra-ub.rs:39 :9
39
+ ::: $DIR/detect-extra-ub.rs:41 :9
40
40
|
41
41
LL | ptr.read();
42
- | ---------- inside `INNER` at $DIR/detect-extra-ub.rs:39 :9
42
+ | ---------- inside `INNER` at $DIR/detect-extra-ub.rs:41 :9
43
43
44
44
error: 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
46
46
|
47
47
LL | const UNALIGNED_READ: () = {
48
48
| ------------------------
@@ -58,7 +58,7 @@ error: aborting due to 6 previous errors
58
58
For more information about this error, try `rustc --explain E0080`.
59
59
Future incompatibility report: Future breakage diagnostic:
60
60
error: 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
62
62
|
63
63
LL | const UNALIGNED_READ: () = {
64
64
| ------------------------
0 commit comments