diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-07 12:27:38 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-07 12:27:38 +0200 |
| commit | bacb4db48c7fe109a7d480b3b5b1cd03898db4a6 (patch) | |
| tree | b54ca24169d09be8a1c439bbe331903f30a99571 /compiler/rustc_span/src | |
| parent | 16ba778c12e3303ab4d334c1c3dbfa5173248a80 (diff) | |
| download | rust-bacb4db48c7fe109a7d480b3b5b1cd03898db4a6.tar.gz rust-bacb4db48c7fe109a7d480b3b5b1cd03898db4a6.zip | |
Only encode position from start of file.
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_span/src/source_map.rs | 4 |
2 files changed, 1 insertions, 7 deletions
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<NonNarrowChar>, mut file_local_normalized_pos: Vec<NormalizedPos>, original_start_pos: BytePos, - original_end_pos: BytePos, + _original_end_pos: BytePos, metadata_index: u32, ) -> Lrc<SourceFile> { 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, |
