fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: static of uninhabited type 2 --> $DIR/uninhabited-static.rs:6:5 3 | 4LL | static VOID: Void; 5 | ^^^^^^^^^^^^^^^^^ 6 | 7 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 8 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840> 9 = note: uninhabited statics cannot be initialized, and any access would be an immediate error 10note: the lint level is defined here 11 --> $DIR/uninhabited-static.rs:2:9 12 | 13LL | #![deny(uninhabited_static)] 14 | ^^^^^^^^^^^^^^^^^^ 15 16error: static of uninhabited type 17 --> $DIR/uninhabited-static.rs:8:5 18 | 19LL | static NEVER: !; 20 | ^^^^^^^^^^^^^^^ 21 | 22 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 23 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840> 24 = note: uninhabited statics cannot be initialized, and any access would be an immediate error 25 26error: static of uninhabited type 27 --> $DIR/uninhabited-static.rs:12:1 28 | 29LL | static VOID2: Void = unsafe { std::mem::transmute(()) }; 30 | ^^^^^^^^^^^^^^^^^^ 31 | 32 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 33 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840> 34 = note: uninhabited statics cannot be initialized, and any access would be an immediate error 35 36error: static of uninhabited type 37 --> $DIR/uninhabited-static.rs:16:1 38 | 39LL | static NEVER2: Void = unsafe { std::mem::transmute(()) }; 40 | ^^^^^^^^^^^^^^^^^^^ 41 | 42 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! 43 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840> 44 = note: uninhabited statics cannot be initialized, and any access would be an immediate error 45 46error[E0080]: could not evaluate static initializer 47 --> $DIR/uninhabited-static.rs:12:31 48 | 49LL | static VOID2: Void = unsafe { std::mem::transmute(()) }; 50 | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type `Void` 51 52warning: the type `Void` does not permit zero-initialization 53 --> $DIR/uninhabited-static.rs:12:31 54 | 55LL | static VOID2: Void = unsafe { std::mem::transmute(()) }; 56 | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed 57 | 58note: enums with no inhabited variants have no valid value 59 --> $DIR/uninhabited-static.rs:4:1 60 | 61LL | enum Void {} 62 | ^^^^^^^^^ 63 = note: `#[warn(invalid_value)]` on by default 64 65error[E0080]: could not evaluate static initializer 66 --> $DIR/uninhabited-static.rs:16:32 67 | 68LL | static NEVER2: Void = unsafe { std::mem::transmute(()) }; 69 | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of uninhabited type `Void` 70 71warning: the type `Void` does not permit zero-initialization 72 --> $DIR/uninhabited-static.rs:16:32 73 | 74LL | static NEVER2: Void = unsafe { std::mem::transmute(()) }; 75 | ^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed 76 | 77note: enums with no inhabited variants have no valid value 78 --> $DIR/uninhabited-static.rs:4:1 79 | 80LL | enum Void {} 81 | ^^^^^^^^^ 82 83error: aborting due to 6 previous errors; 2 warnings emitted 84 85For more information about this error, try `rustc --explain E0080`.