about summary refs log tree commit diff
path: root/compiler/rustc_resolve
diff options
context:
space:
mode:
authorFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-06-18 18:08:26 +0200
committerFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-07-09 23:05:41 +0200
commit6f0fe9b91b8f217bc889f25e44843ff939ce4aa9 (patch)
treecd9994a8ca5be1c4f2360c27765d1a1d20213c9b /compiler/rustc_resolve
parent619c27a53959e2d79aadb01cba5b2c49756df771 (diff)
downloadrust-6f0fe9b91b8f217bc889f25e44843ff939ce4aa9.tar.gz
rust-6f0fe9b91b8f217bc889f25e44843ff939ce4aa9.zip
Fix the ICE described in #83693
Diffstat (limited to 'compiler/rustc_resolve')
-rw-r--r--compiler/rustc_resolve/src/late/lifetimes.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs
index ca7cdc4caf5..0638455a8f1 100644
--- a/compiler/rustc_resolve/src/late/lifetimes.rs
+++ b/compiler/rustc_resolve/src/late/lifetimes.rs
@@ -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",