]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-eval/ref_to_int_match.64bit.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / ref_to_int_match.64bit.stderr
1 error[E0080]: it is undefined behavior to use this value
2 --> $DIR/ref_to_int_match.rs:26:1
3 |
4 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer to alloc3, but expected initialized plain (non-pointer) bytes
6 |
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.
8 = note: the raw bytes of the constant (size: 8, align: 8) {
9 ╾───────alloc3────────╼ │ ╾──────╼
10 }
11
12 error: could not evaluate constant pattern
13 --> $DIR/ref_to_int_match.rs:8:14
14 |
15 LL | 10..=BAR => {},
16 | ^^^
17
18 error: could not evaluate constant pattern
19 --> $DIR/ref_to_int_match.rs:8:14
20 |
21 LL | 10..=BAR => {},
22 | ^^^
23
24 error: aborting due to 3 previous errors
25
26 For more information about this error, try `rustc --explain E0080`.