Skip to content

Commit

Permalink
Do not ICE on closure typeck
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 5, 2019
1 parent 1e2a738 commit 22c65f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2214,6 +2214,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
}

let span = self.tcx.def_span(generator_did);
// Do not ICE on closure typeck (#66868).
if let None = self.tcx.hir().as_local_hir_id(generator_did) {
return false;
}
let tables = self.tcx.typeck_tables_of(generator_did);
debug!("note_obligation_cause_for_async_await: generator_did={:?} span={:?} ",
generator_did, span);
Expand Down

0 comments on commit 22c65f9

Please sign in to comment.