]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/ref_to_int_match.64bit.stderr
merge rustc history
[rust.git] / src / test / ui / consts / const-eval / ref_to_int_match.64bit.stderr
1 error: any use of this value will cause an error
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    = note: `#[deny(const_err)]` on by default
8    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
10    = help: this code performed an operation that depends on the underlying bytes representing a pointer
11    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
12
13 error: could not evaluate constant pattern
14   --> $DIR/ref_to_int_match.rs:7:14
15    |
16 LL |         10..=BAR => {},
17    |              ^^^
18
19 error: could not evaluate constant pattern
20   --> $DIR/ref_to_int_match.rs:7:14
21    |
22 LL |         10..=BAR => {},
23    |              ^^^
24
25 error: aborting due to 3 previous errors
26
27 Future incompatibility report: Future breakage diagnostic:
28 error: any use of this value will cause an error
29   --> $DIR/ref_to_int_match.rs:25:27
30    |
31 LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
32    | --------------            ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
33    |
34    = note: `#[deny(const_err)]` on by default
35    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
37    = help: this code performed an operation that depends on the underlying bytes representing a pointer
38    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
39