]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/ref_to_int_match.64bit.stderr
Auto merge of #96711 - emilio:inline-slice-clone, r=nikic
[rust.git] / src / test / ui / consts / const-eval / ref_to_int_match.64bit.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/ref_to_int_match.rs:25:27
3    |
4 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
5    |                           ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
6    |
7    = help: this code performed an operation that depends on the underlying bytes representing a pointer
8    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
9
10 error: could not evaluate constant pattern
11   --> $DIR/ref_to_int_match.rs:7:14
12    |
13 LL |         10..=BAR => {},
14    |              ^^^
15
16 error: could not evaluate constant pattern
17   --> $DIR/ref_to_int_match.rs:7:14
18    |
19 LL |         10..=BAR => {},
20    |              ^^^
21
22 error: aborting due to 3 previous errors
23
24 For more information about this error, try `rustc --explain E0080`.