summary refs log tree commit diff
path: root/src/test/ui/const-eval/ub-enum-ptr.stderr
blob: 4b7ccc25c6c014615bba5bd7b3c68a707a0b58a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0080]: this constant likely exhibits undefined behavior
  --> $DIR/ub-enum-ptr.rs:23:1
   |
LL | const BAD_ENUM: Enum = unsafe { Foo { a: &1 }.b};
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer at .TAG, but expected something in the range 0..=0
   |
   = 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: aborting due to previous error

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