summary refs log tree commit diff
path: root/src/test/ui/consts/validate_never_arrays.stderr
blob: 7a7d816873350ffc38dcdbba5c249b3ff84cc6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0080]: it is undefined behavior to use this value
  --> $DIR/validate_never_arrays.rs:3:1
   |
LL | const FOO: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>
   |
   = 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`.