@@ -107,62 +107,83 @@ LL | reuse Trait::foo2 { &self.0 }
107
107
| ^^^^
108
108
109
109
error: delegation with early bound generics is not supported yet
110
- --> $DIR/not-supported.rs:74 :21
110
+ --> $DIR/not-supported.rs:76 :21
111
111
|
112
112
LL | pub fn opaque_arg(_: impl Trait) -> i32 { 0 }
113
113
| --------------------------------------- callee defined here
114
114
...
115
115
LL | reuse to_reuse::opaque_arg;
116
116
| ^^^^^^^^^^
117
117
118
- error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:82:5: 82:24>::{synthetic#0}`
119
- --> $DIR/not-supported.rs:83:25
118
+ warning: this function depends on never type fallback being `()`
119
+ --> $DIR/not-supported.rs:80:9
120
+ |
121
+ LL | fn opaque_ret() -> impl Trait { unimplemented!() }
122
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
+ |
124
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
125
+ = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
126
+ = help: specify the types explicitly
127
+ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
128
+
129
+ error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:86:5: 86:24>::{synthetic#0}`
130
+ --> $DIR/not-supported.rs:87:25
120
131
|
121
132
LL | reuse to_reuse::opaque_ret;
122
133
| ^^^^^^^^^^
123
134
|
124
135
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
125
- --> $DIR/not-supported.rs:83 :25
136
+ --> $DIR/not-supported.rs:87 :25
126
137
|
127
138
LL | reuse to_reuse::opaque_ret;
128
139
| ^^^^^^^^^^
129
- = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:82 :5: 82 :24>::{synthetic#0}`, completing the cycle
130
- note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:82 :5: 82 :24>` is well-formed
131
- --> $DIR/not-supported.rs:82 :5
140
+ = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:86 :5: 86 :24>::{synthetic#0}`, completing the cycle
141
+ note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:86 :5: 86 :24>` is well-formed
142
+ --> $DIR/not-supported.rs:86 :5
132
143
|
133
144
LL | impl ToReuse for u8 {
134
145
| ^^^^^^^^^^^^^^^^^^^
135
146
= 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
136
147
137
- error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:25>::{synthetic#0}`
138
- --> $DIR/not-supported.rs:86:24
148
+ warning: this function depends on never type fallback being `()`
149
+ --> $DIR/not-supported.rs:72:9
150
+ |
151
+ LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
152
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153
+ |
154
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
155
+ = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
156
+ = help: specify the types explicitly
157
+
158
+ error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:89:5: 89:25>::{synthetic#0}`
159
+ --> $DIR/not-supported.rs:90:24
139
160
|
140
161
LL | reuse ToReuse::opaque_ret;
141
162
| ^^^^^^^^^^
142
163
|
143
164
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
144
- --> $DIR/not-supported.rs:86 :24
165
+ --> $DIR/not-supported.rs:90 :24
145
166
|
146
167
LL | reuse ToReuse::opaque_ret;
147
168
| ^^^^^^^^^^
148
- = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:85 :5: 85 :25>::{synthetic#0}`, completing the cycle
149
- note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:85 :5: 85 :25>` is well-formed
150
- --> $DIR/not-supported.rs:85 :5
169
+ = note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:89 :5: 89 :25>::{synthetic#0}`, completing the cycle
170
+ note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:89 :5: 89 :25>` is well-formed
171
+ --> $DIR/not-supported.rs:89 :5
151
172
|
152
173
LL | impl ToReuse for u16 {
153
174
| ^^^^^^^^^^^^^^^^^^^^
154
175
= 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
155
176
156
177
error: recursive delegation is not supported yet
157
- --> $DIR/not-supported.rs:99 :22
178
+ --> $DIR/not-supported.rs:103 :22
158
179
|
159
180
LL | pub reuse to_reuse2::foo;
160
181
| --- callee defined here
161
182
...
162
183
LL | reuse to_reuse1::foo;
163
184
| ^^^
164
185
165
- error: aborting due to 16 previous errors
186
+ error: aborting due to 16 previous errors; 2 warnings emitted
166
187
167
188
Some errors have detailed explanations: E0049, E0195, E0391.
168
189
For more information about an error, try `rustc --explain E0049`.
0 commit comments