1
Fork 0

Fix the ICE described in #83693

This commit is contained in:
Fabian Wolff 2021-06-18 18:08:26 +02:00
parent 619c27a539
commit 6f0fe9b91b
5 changed files with 89 additions and 3 deletions

View file

@ -2688,15 +2688,14 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
Scope::Binder { hir_id, .. } => {
break *hir_id;
}
Scope::Body { id, .. } => break id.hir_id,
Scope::ObjectLifetimeDefault { ref s, .. }
| Scope::Elision { ref s, .. }
| Scope::Supertrait { ref s, .. }
| Scope::TraitRefBoundary { ref s, .. } => {
scope = *s;
}
Scope::Root => {
// See issue #83907. Just bail out from looking inside.
Scope::Root | Scope::Body { .. } => {
// See issues #83907 and #83693. Just bail out from looking inside.
self.tcx.sess.delay_span_bug(
rustc_span::DUMMY_SP,
"In fn_like_elision without appropriate scope above",