Skip to content

Commit 459398d

Browse files
authored
Rollup merge of rust-lang#67071 - estebank:issue-66868, r=davidtwco
Do not ICE on closure typeck Tackle rust-lang#66868. r? @davidtwco
2 parents 941c4cd + 22c65f9 commit 459398d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc/traits/error_reporting.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2210,6 +2210,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
22102210
}
22112211

22122212
let span = self.tcx.def_span(generator_did);
2213+
// Do not ICE on closure typeck (#66868).
2214+
if let None = self.tcx.hir().as_local_hir_id(generator_did) {
2215+
return false;
2216+
}
22132217
let tables = self.tcx.typeck_tables_of(generator_did);
22142218
debug!("note_obligation_cause_for_async_await: generator_did={:?} span={:?} ",
22152219
generator_did, span);

0 commit comments

Comments
 (0)