]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/double_check2.stderr
21025877340eabd482f19268d2a2535b003577bf
[rust.git] / src / test / ui / consts / const-eval / double_check2.stderr
1 error[E0080]: this static likely exhibits undefined behavior
2   --> $DIR/double_check2.rs:25:1
3    |
4 LL | / static FOO: (&Foo, &Bar) = unsafe {( //~ undefined behavior
5 LL | |     Union { usize: &BAR }.foo,
6 LL | |     Union { usize: &BAR }.bar,
7 LL | | )};
8    | |___^ type validation failed: encountered invalid enum discriminant 5 at .1.<deref>
9    |
10    = 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
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0080`.