]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-eval/union-const-eval-field.stderr
Sanity-check all constants
[rust.git] / src / test / ui / const-eval / union-const-eval-field.stderr
1 error[E0080]: this constant likely exhibits undefined behavior
2   --> $DIR/union-const-eval-field.rs:37:5
3    |
4 LL |     const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR exhibits undefined behavior
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered undefined bytes
6    |
7    = 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
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0080`.