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
Auto merge of #133086 - GuillaumeGomez:rollup-kbkfrkj, r=GuillaumeGomez
Rollup of 5 pull requests
Successful merges:
- #132936 (For expr `return (_ = 42);` unused_paren lint should not be triggered)
- #132956 (Add visit_coroutine_kind to ast::Visitor)
- #132978 (Mention both release *and* edition breakage for never type lints)
- #133074 (make UI test OS-agnostic)
- #133080 (Fix span edition for 2024 RPIT coming from an external macro )
r? `@ghost`
`@rustbot` modify labels: rollup
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`
2
-
--> $DIR/unsupported.rs:26:25
1
+
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::{synthetic#0}`
2
+
--> $DIR/unsupported.rs:22:25
3
3
|
4
4
LL | reuse to_reuse::opaque_ret;
5
5
| ^^^^^^^^^^
6
6
|
7
7
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
8
-
--> $DIR/unsupported.rs:26:25
8
+
--> $DIR/unsupported.rs:22:25
9
9
|
10
10
LL | reuse to_reuse::opaque_ret;
11
11
| ^^^^^^^^^^
12
-
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`, completing the cycle
13
-
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>` is well-formed
14
-
--> $DIR/unsupported.rs:25:5
12
+
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::{synthetic#0}`, completing the cycle
13
+
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>` is well-formed
14
+
--> $DIR/unsupported.rs:21:5
15
15
|
16
16
LL | impl ToReuse for u8 {
17
17
| ^^^^^^^^^^^^^^^^^^^
18
18
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
19
19
20
-
warning: this function depends on never type fallback being `()`
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`
52
-
--> $DIR/unsupported.rs:29:24
20
+
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::{synthetic#0}`
21
+
--> $DIR/unsupported.rs:25:24
53
22
|
54
23
LL | reuse ToReuse::opaque_ret;
55
24
| ^^^^^^^^^^
56
25
|
57
26
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
58
-
--> $DIR/unsupported.rs:29:24
27
+
--> $DIR/unsupported.rs:25:24
59
28
|
60
29
LL | reuse ToReuse::opaque_ret;
61
30
| ^^^^^^^^^^
62
-
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`, completing the cycle
63
-
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>` is well-formed
64
-
--> $DIR/unsupported.rs:28:5
31
+
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::{synthetic#0}`, completing the cycle
32
+
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>` is well-formed
33
+
--> $DIR/unsupported.rs:24:5
65
34
|
66
35
LL | impl ToReuse for u16 {
67
36
| ^^^^^^^^^^^^^^^^^^^^
68
37
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
69
38
70
39
error: recursive delegation is not supported yet
71
-
--> $DIR/unsupported.rs:42:22
40
+
--> $DIR/unsupported.rs:38:22
72
41
|
73
42
LL | pub reuse to_reuse2::foo;
74
43
| --- callee defined here
@@ -77,14 +46,14 @@ LL | reuse to_reuse1::foo;
77
46
| ^^^
78
47
79
48
error[E0283]: type annotations needed
80
-
--> $DIR/unsupported.rs:52:18
49
+
--> $DIR/unsupported.rs:48:18
81
50
|
82
51
LL | reuse Trait::foo;
83
52
| ^^^ cannot infer type
84
53
|
85
54
= note: cannot satisfy `_: effects::Trait`
86
55
87
-
error: aborting due to 4 previous errors; 2 warnings emitted
56
+
error: aborting due to 4 previous errors
88
57
89
58
Some errors have detailed explanations: E0283, E0391.
90
59
For more information about an error, try `rustc --explain E0283`.
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
0 commit comments