error[E0080]: evaluation of constant value failed
--> $DIR/validate_uninhabited_zsts.rs:4:14
|
+LL | unsafe { std::mem::transmute(()) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^ transmuting to uninhabited type
+ |
+note: inside `foo`
+ --> $DIR/validate_uninhabited_zsts.rs:4:14
+ |
LL | unsafe { std::mem::transmute(()) }
| ^^^^^^^^^^^^^^^^^^^^^^^
- | |
- | transmuting to uninhabited type
- | inside `foo`
-...
+note: inside `FOO`
+ --> $DIR/validate_uninhabited_zsts.rs:19:33
+ |
LL | const FOO: [empty::Empty; 3] = [foo(); 3];
- | ----- inside `FOO`
+ | ^^^^^
error[E0080]: it is undefined behavior to use this value
--> $DIR/validate_uninhabited_zsts.rs:21:1