]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/ref_to_int_match.32bit.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / ref_to_int_match.32bit.stderr
CommitLineData
a1dfa0c6 1error[E0080]: it is undefined behavior to use this value
94222f64 2 --> $DIR/ref_to_int_match.rs:25:1
94b46f34 3 |
532ac7d7 4LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
923072b8 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer to alloc3, but expected plain (non-pointer) bytes
a1dfa0c6 6 |
e1599b0c 7 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5 8 = note: the raw bytes of the constant (size: 4, align: 4) {
136023e0 9 ╾─alloc3──╼ │ ╾──╼
cdc7bbd5 10 }
a1dfa0c6
XL
11
12error: could not evaluate constant pattern
94222f64 13 --> $DIR/ref_to_int_match.rs:7:14
a1dfa0c6 14 |
532ac7d7 15LL | 10..=BAR => {},
a1dfa0c6 16 | ^^^
94b46f34 17
dfeec247 18error: could not evaluate constant pattern
94222f64 19 --> $DIR/ref_to_int_match.rs:7:14
dfeec247
XL
20 |
21LL | 10..=BAR => {},
22 | ^^^
23
24error: aborting due to 3 previous errors
94b46f34 25
a1dfa0c6 26For more information about this error, try `rustc --explain E0080`.