about summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/double_check2.stderr
blob: 81fa5c0df13f6f626bccf3f6edc64b3f82ed4a8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0080]: it is undefined behavior to use this value
  --> $DIR/double_check2.rs:16:1
   |
LL | / static FOO: (&Foo, &Bar) = unsafe {(
LL | |     Union { u8: &BAR }.foo,
LL | |     Union { u8: &BAR }.bar,
LL | | )};
   | |___^ type validation failed: encountered 0x05 at .1.<deref>, but expected a valid enum discriminant
   |
   = 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.

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.