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
Rollup merge of rust-lang#126367 - compiler-errors:point-out-failing-never-obligation, r=WaffleLapkin
Point out failing never obligation for `DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK`
Based on top of rust-lang#125289, so just need to look at the last commit.
r? `@WaffleLapkin`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
125
125
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
126
126
= help: specify the types explicitly
127
+
note: in edition 2024, the requirement `!: opaque::Trait` will fail
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
155
160
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
156
161
= help: specify the types explicitly
162
+
note: in edition 2024, the requirement `!: opaque::Trait` will fail
Copy file name to clipboardexpand all lines: tests/ui/editions/never-type-fallback-breaking.e2021.stderr
+10
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn m() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: Default` will fail
11
+
--> $DIR/never-type-fallback-breaking.rs:19:17
12
+
|
13
+
LL | true => Default::default(),
14
+
| ^^^^^^^^^^^^^^^^^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
11
16
12
17
warning: this function depends on never type fallback being `()`
@@ -18,6 +23,11 @@ LL | fn q() -> Option<()> {
18
23
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19
24
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
20
25
= help: specify the types explicitly
26
+
note: in edition 2024, the requirement `!: Default` will fail
Copy file name to clipboardexpand all lines: tests/ui/never_type/defaulted-never-note.nofallback.stderr
+5
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn smeg() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will fail
11
+
--> $DIR/defaulted-never-note.rs:32:9
12
+
|
13
+
LL | foo(_x);
14
+
| ^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
Copy file name to clipboardexpand all lines: tests/ui/never_type/dependency-on-fallback-to-unit.stderr
+10
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn def() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: Default` will fail
11
+
--> $DIR/dependency-on-fallback-to-unit.rs:12:19
12
+
|
13
+
LL | false => <_>::default(),
14
+
| ^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
11
16
12
17
warning: this function depends on never type fallback being `()`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19
24
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
20
25
= help: specify the types explicitly
26
+
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
+10
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn assignment() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: UnitDefault` will fail
11
+
--> $DIR/diverging-fallback-control-flow.rs:36:13
12
+
|
13
+
LL | x = UnitDefault::default();
14
+
| ^^^^^^^^^^^^^^^^^^^^^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
11
16
12
17
warning: this function depends on never type fallback being `()`
@@ -18,6 +23,11 @@ LL | fn assignment_rev() {
18
23
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19
24
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
20
25
= help: specify the types explicitly
26
+
note: in edition 2024, the requirement `!: UnitDefault` will fail
Copy file name to clipboardexpand all lines: tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr
+5
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn main() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: Test` will fail
11
+
--> $DIR/diverging-fallback-no-leak.rs:20:23
12
+
|
13
+
LL | unconstrained_arg(return);
14
+
| ^^^^^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
Copy file name to clipboardexpand all lines: tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr
+5
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn main() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: UnitReturn` will fail
Copy file name to clipboardexpand all lines: tests/ui/never_type/fallback-closure-ret.nofallback.stderr
+5
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ LL | fn main() {
7
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
8
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
9
9
= help: specify the types explicitly
10
+
note: in edition 2024, the requirement `!: Bar` will fail
11
+
--> $DIR/fallback-closure-ret.rs:24:5
12
+
|
13
+
LL | foo(|| panic!());
14
+
| ^^^^^^^^^^^^^^^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
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
+
note: in edition 2024, the requirement `!: T` will fail
11
+
--> $DIR/impl_trait_fallback.rs:8:25
12
+
|
13
+
LL | fn should_ret_unit() -> impl T {
14
+
| ^^^^^^
10
15
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
0 commit comments