diff options
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_span/src/source_map.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_span/src/source_map/tests.rs | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index cf306928151..bae05f2f02e 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -1098,6 +1098,8 @@ pub enum ExternalSource { 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 28381157d50..387777f7af6 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -337,6 +337,7 @@ impl SourceMap { mut file_local_normalized_pos: Vec<NormalizedPos>, original_start_pos: BytePos, original_end_pos: BytePos, + metadata_index: u32, ) -> Lrc<SourceFile> { let start_pos = self .allocate_address_space(source_len) @@ -383,6 +384,7 @@ impl SourceMap { kind: ExternalSourceKind::AbsentOk, original_start_pos, original_end_pos, + metadata_index, }), start_pos, end_pos, diff --git a/compiler/rustc_span/src/source_map/tests.rs b/compiler/rustc_span/src/source_map/tests.rs index be827cea874..2cada019b7f 100644 --- a/compiler/rustc_span/src/source_map/tests.rs +++ b/compiler/rustc_span/src/source_map/tests.rs @@ -252,6 +252,7 @@ fn t10() { normalized_pos, start_pos, end_pos, + 0, ); assert!( |
