Skip to content

Commit 7945d60

Browse files
committed
Exhaustive match on CoroutineKind
1 parent f86ac59 commit 7945d60

File tree

1 file changed

+5
-1
lines changed
  • compiler/rustc_trait_selection/src/error_reporting/infer

1 file changed

+5
-1
lines changed

compiler/rustc_trait_selection/src/error_reporting/infer/suggest.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
172172
hir::CoroutineDesugaring::Async | hir::CoroutineDesugaring::AsyncGen,
173173
_,
174174
)) => (),
175-
_ => return,
175+
None
176+
| Some(
177+
hir::CoroutineKind::Coroutine(_)
178+
| hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Gen, _),
179+
) => return,
176180
}
177181

178182
if let ObligationCauseCode::CompareImplItem { .. } = cause.code() {

0 commit comments

Comments
 (0)