We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 233f832 commit f86ac59Copy full SHA for f86ac59
compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs
@@ -167,12 +167,12 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
167
exp_span, exp_found.expected, exp_found.found,
168
);
169
170
- let is_async_block = matches!(
171
- self.tcx.coroutine_kind(cause.body_id),
172
- Some(rustc_hir::CoroutineKind::Desugared(rustc_hir::CoroutineDesugaring::Async, _)),
173
- );
174
- if !is_async_block {
175
- return;
+ match self.tcx.coroutine_kind(cause.body_id) {
+ Some(hir::CoroutineKind::Desugared(
+ hir::CoroutineDesugaring::Async | hir::CoroutineDesugaring::AsyncGen,
+ _,
+ )) => (),
+ _ => return,
176
}
177
178
if let ObligationCauseCode::CompareImplItem { .. } = cause.code() {
0 commit comments