diff options
| author | Fabian Wolff <fabian.wolff@alumni.ethz.ch> | 2021-06-18 18:08:26 +0200 |
|---|---|---|
| committer | Fabian Wolff <fabian.wolff@alumni.ethz.ch> | 2021-07-09 23:05:41 +0200 |
| commit | 6f0fe9b91b8f217bc889f25e44843ff939ce4aa9 (patch) | |
| tree | cd9994a8ca5be1c4f2360c27765d1a1d20213c9b /compiler/rustc_resolve | |
| parent | 619c27a53959e2d79aadb01cba5b2c49756df771 (diff) | |
| download | rust-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.rs | 5 |
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", |
