2022-09-21 11:05:20 +00:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-06-03 00:30:29 +00:00
|
|
|
--> $DIR/ref_to_int_match.rs:25:27
|
2018-05-24 09:03:33 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
|
2022-09-21 11:05:20 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
|
2018-09-04 10:26:21 +00:00
|
|
|
|
|
2022-08-27 21:46:14 +00: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
|
2018-09-04 10:26:21 +00:00
|
|
|
|
|
|
|
error: could not evaluate constant pattern
|
2021-06-03 07:31:27 +00:00
|
|
|
--> $DIR/ref_to_int_match.rs:7:14
|
2018-09-04 10:26:21 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | 10..=BAR => {},
|
2018-09-04 10:26:21 +00:00
|
|
|
| ^^^
|
2018-05-24 09:03:33 +00:00
|
|
|
|
2020-01-08 17:02:10 +00:00
|
|
|
error: could not evaluate constant pattern
|
2021-06-03 07:31:27 +00:00
|
|
|
--> $DIR/ref_to_int_match.rs:7:14
|
2020-01-08 17:02:10 +00:00
|
|
|
|
|
|
|
|
LL | 10..=BAR => {},
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2018-05-24 09:03:33 +00:00
|
|
|
|
2022-09-21 11:05:20 +00:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|