From b2bef02bcdc322a42ccde2688f34dce01a0cbb50 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 30 Sep 2022 10:45:02 -0300 Subject: create def ids for impl traits during ast lowering --- compiler/rustc_query_system/src/ich/hcx.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_query_system') diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_query_system/src/ich/hcx.rs index 8140c243453..148eabb38e2 100644 --- a/compiler/rustc_query_system/src/ich/hcx.rs +++ b/compiler/rustc_query_system/src/ich/hcx.rs @@ -12,7 +12,7 @@ use rustc_session::cstore::CrateStore; use rustc_session::Session; use rustc_span::source_map::SourceMap; use rustc_span::symbol::Symbol; -use rustc_span::{BytePos, CachingSourceMapView, SourceFile, Span, SpanData}; +use rustc_span::{BytePos, CachingSourceMapView, SourceFile, Span, SpanData, DUMMY_SP}; /// This is the context state available during incr. comp. hashing. It contains /// enough information to transform `DefId`s and `HirId`s into stable `DefPath`s (i.e., @@ -185,7 +185,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> { #[inline] fn def_span(&self, def_id: LocalDefId) -> Span { - self.source_span[def_id] + *self.source_span.get(def_id).unwrap_or(&DUMMY_SP) } #[inline] -- cgit 1.4.1-3-g733a5