You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/editions/never-type-fallback-breaking.e2021.fixed
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ fn main() {
16
16
17
17
fn m() {
18
18
//[e2021]~^ this function depends on never type fallback being `()`
19
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
20
20
let x: () = match true {
21
21
true => Default::default(),
22
22
//[e2024]~^ error: the trait bound `!: Default` is not satisfied
@@ -28,7 +28,7 @@ fn m() {
28
28
29
29
fn q() -> Option<()> {
30
30
//[e2021]~^ this function depends on never type fallback being `()`
31
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
//[e2021]~^ this function depends on never type fallback being `()`
48
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
48
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
49
49
help::<(), _>(1)?;
50
50
//[e2024]~^ error: the trait bound `(): From<!>` is not satisfied
Copy file name to clipboardExpand all lines: tests/ui/editions/never-type-fallback-breaking.e2021.stderr
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()`
4
4
LL | fn m() {
5
5
| ^^^^^^
6
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!
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
8
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
10
note: in edition 2024, the requirement `!: Default` will fail
@@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()`
24
24
LL | fn q() -> Option<()> {
25
25
| ^^^^^^^^^^^^^^^^^^^^
26
26
|
27
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
28
28
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
29
29
= help: specify the types explicitly
30
30
note: in edition 2024, the requirement `!: Default` will fail
@@ -43,7 +43,7 @@ warning: this function depends on never type fallback being `()`
43
43
LL | fn meow() -> Result<(), ()> {
44
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
45
|
46
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
46
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
47
47
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
48
48
= help: specify the types explicitly
49
49
note: in edition 2024, the requirement `(): From<!>` will fail
Copy file name to clipboardExpand all lines: tests/ui/editions/never-type-fallback-breaking.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ fn main() {
16
16
17
17
fnm(){
18
18
//[e2021]~^ this function depends on never type fallback being `()`
19
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
20
20
let x = matchtrue{
21
21
true => Default::default(),
22
22
//[e2024]~^ error: the trait bound `!: Default` is not satisfied
@@ -28,7 +28,7 @@ fn m() {
28
28
29
29
fnq() -> Option<()>{
30
30
//[e2021]~^ this function depends on never type fallback being `()`
31
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
//[e2021]~^ this function depends on never type fallback being `()`
48
-
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
48
+
//[e2021]~| this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
49
49
help(1)?;
50
50
//[e2024]~^ error: the trait bound `(): From<!>` is not satisfied
Copy file name to clipboardExpand all lines: tests/ui/never_type/defaulted-never-note.nofallback.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()`
4
4
LL | fn smeg() {
5
5
| ^^^^^^^^^
6
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!
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
8
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
10
note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will fail
//[nofallback]~^ warn: this function depends on never type fallback being `()`
30
-
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30
+
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
Copy file name to clipboardExpand all lines: tests/ui/never_type/dependency-on-fallback-to-unit.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ fn main() {
7
7
8
8
fndef(){
9
9
//~^ warn: this function depends on never type fallback being `()`
10
-
//~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
10
+
//~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
//~^ warn: this function depends on never type fallback being `()`
21
-
//~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21
+
//~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
Copy file name to clipboardExpand all lines: tests/ui/never_type/dependency-on-fallback-to-unit.stderr
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ warning: this function depends on never type fallback being `()`
4
4
LL | fn def() {
5
5
| ^^^^^^^^
6
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!
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
8
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
10
note: in edition 2024, the requirement `!: Default` will fail
@@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()`
24
24
LL | fn question_mark() -> Result<(), ()> {
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
26
|
27
-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
28
28
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
29
29
= help: specify the types explicitly
30
30
note: in edition 2024, the requirement `!: Default` will fail
0 commit comments