rust/src/test/ui/consts/const-eval/ref_to_int_match.stderr

18 lines
873 B
Plaintext
Raw Normal View History

error[E0080]: it is undefined behavior to use this value
2018-12-25 09:56:47 -06:00
--> $DIR/ref_to_int_match.rs:23:1
|
LL | const BAR: Int = unsafe { Foo { r: &42 }.f }; //~ ERROR it is undefined behavior to use this value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
error: could not evaluate constant pattern
2018-12-25 09:56:47 -06:00
--> $DIR/ref_to_int_match.rs:7:14
|
LL | 10..=BAR => {}, //~ ERROR could not evaluate constant pattern
| ^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0080`.