2018-09-04 05:26:21 -05:00
error[E0080]: it is undefined behavior to use this value
2019-08-30 02:35:02 -05:00
--> $DIR/ref_to_int_match.rs:24:1
2018-05-24 04:03:33 -05:00
|
2019-03-09 06:03:44 -06:00
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
2018-11-12 03:32:23 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes
2018-09-04 05:26:21 -05:00
|
2019-09-01 12:09:59 -05:00
= 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.
2018-09-04 05:26:21 -05:00
error: could not evaluate constant pattern
2018-12-25 09:56:47 -06:00
--> $DIR/ref_to_int_match.rs:7:14
2018-09-04 05:26:21 -05:00
|
2019-03-09 06:03:44 -06:00
LL | 10..=BAR => {},
2018-09-04 05:26:21 -05:00
| ^^^
2018-05-24 04:03:33 -05:00
2018-09-04 05:26:21 -05:00
error: aborting due to 2 previous errors
2018-05-24 04:03:33 -05:00
2018-09-04 05:26:21 -05:00
For more information about this error, try `rustc --explain E0080`.