Skip to content

Commit

Permalink
Rollup merge of rust-lang#67071 - estebank:issue-66868, r=davidtwco
Browse files Browse the repository at this point in the history
Do not ICE on closure typeck

Tackle rust-lang#66868.

r? @davidtwco
  • Loading branch information
Centril committed Dec 6, 2019
2 parents 941c4cd + 22c65f9 commit 459398d
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 @@ -2210,6 +2210,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 459398d

Please sign in to comment.