From bacb4db48c7fe109a7d480b3b5b1cd03898db4a6 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sun, 7 Aug 2022 12:27:38 +0200 Subject: Only encode position from start of file. --- compiler/rustc_span/src/lib.rs | 4 ---- compiler/rustc_span/src/source_map.rs | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'compiler/rustc_span/src') diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index bae05f2f02e..8d26cd6bee3 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -1094,10 +1094,6 @@ pub enum ExternalSource { Unneeded, Foreign { kind: ExternalSourceKind, - /// This SourceFile's byte-offset within the source_map of its original crate. - original_start_pos: BytePos, - /// The end of this SourceFile within the source_map of its original crate. - original_end_pos: BytePos, /// Index of the file inside metadata. metadata_index: u32, }, diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs index 387777f7af6..c0fbb7f2c9f 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -336,7 +336,7 @@ impl SourceMap { mut file_local_non_narrow_chars: Vec, mut file_local_normalized_pos: Vec, original_start_pos: BytePos, - original_end_pos: BytePos, + _original_end_pos: BytePos, metadata_index: u32, ) -> Lrc { let start_pos = self @@ -382,8 +382,6 @@ impl SourceMap { src_hash, external_src: Lock::new(ExternalSource::Foreign { kind: ExternalSourceKind::AbsentOk, - original_start_pos, - original_end_pos, metadata_index, }), start_pos, -- cgit 1.4.1-3-g733a5