1
Fork 0

Keep a parent LocalDefId in SpanData.

This commit is contained in:
Camille GILLOT 2021-04-18 14:27:04 +02:00
parent 06f7ca307d
commit 00485e0c0e
22 changed files with 88 additions and 40 deletions

View file

@ -536,7 +536,8 @@ impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for Span {
let hi =
(hi + source_file.translated_source_file.start_pos) - source_file.original_start_pos;
Ok(Span::new(lo, hi, ctxt))
// Do not try to decode parent for foreign spans.
Ok(Span::new(lo, hi, ctxt, None))
}
}