2022-09-21 06:05:20 -05:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2023-02-27 11:43:39 -06:00
|
|
|
--> $DIR/ref_to_int_match.rs:24:27
|
2021-03-31 04:33:45 -05:00
|
|
|
|
|
|
|
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
|
2023-08-02 09:14:36 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ unable to turn pointer into integer
|
2021-03-31 04:33:45 -05:00
|
|
|
|
|
2022-08-27 16:46:14 -05:00
|
|
|
= help: this code performed an operation that depends on the underlying bytes representing a pointer
|
|
|
|
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
|
2021-03-31 04:33:45 -05:00
|
|
|
|
|
|
|
error: could not evaluate constant pattern
|
2021-06-03 02:31:27 -05:00
|
|
|
--> $DIR/ref_to_int_match.rs:7:14
|
2021-03-31 04:33:45 -05:00
|
|
|
|
|
|
|
|
LL | 10..=BAR => {},
|
|
|
|
| ^^^
|
|
|
|
|
2023-02-27 11:43:39 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2021-03-31 04:33:45 -05:00
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|