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-3
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-3
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-3
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-1
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-2
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-2
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
Copy file name to clipboardExpand all lines: tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr
+2-2
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 assignment() {
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 `!: UnitDefault` will fail
@@ -24,7 +24,7 @@ warning: this function depends on never type fallback being `()`
24
24
LL | fn assignment_rev() {
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 `!: UnitDefault` will fail
Copy file name to clipboardExpand all lines: tests/ui/never_type/diverging-fallback-control-flow.rs
+2-2
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ impl UnitDefault for () {
29
29
30
30
fnassignment(){
31
31
//[nofallback]~^ warn: this function depends on never type fallback being `()`
32
-
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
32
+
//[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!
33
33
let x;
34
34
35
35
iftrue{
@@ -41,7 +41,7 @@ fn assignment() {
41
41
42
42
fnassignment_rev(){
43
43
//[nofallback]~^ warn: this function depends on never type fallback being `()`
44
-
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
44
+
//[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/diverging-fallback-no-leak.nofallback.stderr
+1-1
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 main() {
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 `!: Test` will fail
//[nofallback]~^ warn: this function depends on never type fallback being `()`
16
-
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
16
+
//[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/diverging-fallback-unconstrained-return.nofallback.stderr
+1-1
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 main() {
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 `!: UnitReturn` will fail
Copy file name to clipboardExpand all lines: tests/ui/never_type/diverging-fallback-unconstrained-return.rs
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ fn unconstrained_return<T: UnitReturn>() -> T {
27
27
28
28
fnmain(){
29
29
//[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!
31
31
32
32
// In Ye Olde Days, the `T` parameter of `unconstrained_return`
33
33
// winds up "entangled" with the `!` type that results from
Copy file name to clipboardExpand all lines: tests/ui/never_type/fallback-closure-ret.nofallback.stderr
+1-1
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 main() {
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 `!: Bar` will fail
//[nofallback]~^ warn: this function depends on never type fallback being `()`
23
-
//[nofallback]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23
+
//[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/impl_trait_fallback.rs
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,6 @@ impl T for () {}
7
7
8
8
fnshould_ret_unit() -> implT{
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!
Copy file name to clipboardExpand all lines: tests/ui/never_type/impl_trait_fallback.stderr
+1-1
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 should_ret_unit() -> impl T {
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 `!: T` will fail
0 commit comments