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
= help: you might have intended to use the type `()` here instead
9
9
10
10
error[E0277]: the trait bound `!: Default` is not satisfied
11
-
--> $DIR/never-type-fallback-breaking.rs:35:5
11
+
--> $DIR/never-type-fallback-breaking.rs:39:5
12
12
|
13
13
LL | deserialize()?;
14
14
| ^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
15
15
|
16
16
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #148922 <https://github.com/rust-lang/rust/issues/148922> for more information)
17
17
= help: you might have intended to use the type `()` here instead
18
18
note: required by a bound in `deserialize`
19
-
--> $DIR/never-type-fallback-breaking.rs:31:23
19
+
--> $DIR/never-type-fallback-breaking.rs:35:23
20
20
|
21
21
LL | fn deserialize<T: Default>() -> Option<T> {
22
22
| ^^^^^^^ required by this bound in `deserialize`
23
23
24
24
error[E0277]: the trait bound `(): From<!>` is not satisfied
25
-
--> $DIR/never-type-fallback-breaking.rs:48:5
25
+
--> $DIR/never-type-fallback-breaking.rs:52:5
26
26
|
27
27
LL | help(1)?;
28
28
| ^^^^^^^ the trait `From<!>` is not implemented for `()`
= help: you might have intended to use the type `()` here instead
55
55
56
56
error[E0277]: the trait bound `!: Default` is not satisfied
57
-
--> $DIR/never-type-fallback-breaking.rs:74:17
57
+
--> $DIR/never-type-fallback-breaking.rs:78:17
58
58
|
59
59
LL | takes_apit2(mk()?);
60
60
| ----------- ^^^^^ the trait `Default` is not implemented for `!`
@@ -64,7 +64,7 @@ LL | takes_apit2(mk()?);
64
64
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #148922 <https://github.com/rust-lang/rust/issues/148922> for more information)
65
65
= help: you might have intended to use the type `()` here instead
//[e2024]~^ error: the trait bound `!: Default` is not satisfied
76
80
Ok(())
77
81
}
78
-
79
-
fnreturn_as_argument(){
80
-
//[e2021]~^ error: this function depends on never type fallback being `()`
81
-
//[e2021]~| 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!
82
-
takes_apit2(return);
83
-
//[e2024]~^ error: trait bound `!: Test` is not satisfied
0 commit comments