]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-eval/double_check2.stderr
Sanity-check all constants
[rust.git] / src / test / ui / 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 5 at (*.1).TAG, but expected something in the range 42..=99
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`.