1
Fork 0

Rollup merge of #67071 - estebank:issue-66868, r=davidtwco

Do not ICE on closure typeck

Tackle #66868.

r? @davidtwco
This commit is contained in:
Mazdak Farrokhzad 2019-12-06 23:27:00 +01:00 committed by GitHub
commit 459398dc40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);