diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-04-18 14:27:04 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-09-10 20:17:33 +0200 |
| commit | 00485e0c0e8dcd64c57a86d706beb62054921253 (patch) | |
| tree | d5920e5354a86ea0180d39f7068029f0a33bc296 /compiler/rustc_metadata | |
| parent | 06f7ca307d7ffdbdafe05eb76cc850eaf716916d (diff) | |
| download | rust-00485e0c0e8dcd64c57a86d706beb62054921253.tar.gz rust-00485e0c0e8dcd64c57a86d706beb62054921253.zip | |
Keep a parent LocalDefId in SpanData.
Diffstat (limited to 'compiler/rustc_metadata')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index dd44e0cb1fa..5f01cfa6a7d 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -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)) } } |
