11error: static of uninhabited type
2- --> $DIR/uninhabited-static.rs:12 :1
2+ --> $DIR/uninhabited-static.rs:11 :1
33 |
44LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
55 | ^^^^^^^^^^^^^^^^^^
66 |
77 = note: uninhabited statics cannot be initialized, and any access would be an immediate error
88 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
10- note: the lint level is defined here
11- --> $DIR/uninhabited-static.rs:2:9
12- |
13- LL | #![deny(uninhabited_static)]
14- | ^^^^^^^^^^^^^^^^^^
10+ = note: `#[deny(uninhabited_static)]` (part of `#[deny(future_incompatible)]`) on by default
1511
1612error: static of uninhabited type
17- --> $DIR/uninhabited-static.rs:15 :1
13+ --> $DIR/uninhabited-static.rs:14 :1
1814 |
1915LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
2016 | ^^^^^^^^^^^^^^^^^^^
@@ -24,7 +20,7 @@ LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
2420 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
2521
2622error: static of uninhabited type
27- --> $DIR/uninhabited-static.rs:6 :5
23+ --> $DIR/uninhabited-static.rs:5 :5
2824 |
2925LL | static VOID: Void;
3026 | ^^^^^^^^^^^^^^^^^
@@ -34,7 +30,7 @@ LL | static VOID: Void;
3430 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
3531
3632error: static of uninhabited type
37- --> $DIR/uninhabited-static.rs:8 :5
33+ --> $DIR/uninhabited-static.rs:7 :5
3834 |
3935LL | static NEVER: !;
4036 | ^^^^^^^^^^^^^^^
@@ -44,17 +40,65 @@ LL | static NEVER: !;
4440 = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
4541
4642error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void`
47- --> $DIR/uninhabited-static.rs:12 :31
43+ --> $DIR/uninhabited-static.rs:11 :31
4844 |
4945LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
5046 | ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `VOID2` failed here
5147
5248error[E0080]: constructing invalid value: encountered a value of uninhabited type `Void`
53- --> $DIR/uninhabited-static.rs:15 :32
49+ --> $DIR/uninhabited-static.rs:14 :32
5450 |
5551LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
5652 | ^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `NEVER2` failed here
5753
5854error: aborting due to 6 previous errors
5955
6056For more information about this error, try `rustc --explain E0080`.
57+ Future incompatibility report: Future breakage diagnostic:
58+ error: static of uninhabited type
59+ --> $DIR/uninhabited-static.rs:11:1
60+ |
61+ LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
62+ | ^^^^^^^^^^^^^^^^^^
63+ |
64+ = note: uninhabited statics cannot be initialized, and any access would be an immediate error
65+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
66+ = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
67+ = note: `#[deny(uninhabited_static)]` (part of `#[deny(future_incompatible)]`) on by default
68+
69+ Future breakage diagnostic:
70+ error: static of uninhabited type
71+ --> $DIR/uninhabited-static.rs:14:1
72+ |
73+ LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
74+ | ^^^^^^^^^^^^^^^^^^^
75+ |
76+ = note: uninhabited statics cannot be initialized, and any access would be an immediate error
77+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
78+ = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
79+ = note: `#[deny(uninhabited_static)]` (part of `#[deny(future_incompatible)]`) on by default
80+
81+ Future breakage diagnostic:
82+ error: static of uninhabited type
83+ --> $DIR/uninhabited-static.rs:5:5
84+ |
85+ LL | static VOID: Void;
86+ | ^^^^^^^^^^^^^^^^^
87+ |
88+ = note: uninhabited statics cannot be initialized, and any access would be an immediate error
89+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
90+ = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
91+ = note: `#[deny(uninhabited_static)]` (part of `#[deny(future_incompatible)]`) on by default
92+
93+ Future breakage diagnostic:
94+ error: static of uninhabited type
95+ --> $DIR/uninhabited-static.rs:7:5
96+ |
97+ LL | static NEVER: !;
98+ | ^^^^^^^^^^^^^^^
99+ |
100+ = note: uninhabited statics cannot be initialized, and any access would be an immediate error
101+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
102+ = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>
103+ = note: `#[deny(uninhabited_static)]` (part of `#[deny(future_incompatible)]`) on by default
104+
0 commit comments