diff options
| author | David Lavati <david.lavati@gmail.com> | 2018-10-29 21:26:13 +0100 |
|---|---|---|
| committer | David Lavati <david.lavati@gmail.com> | 2018-10-29 21:26:13 +0100 |
| commit | 6c9f6a1afdd60603ddb7ab28755fbc134b7d4844 (patch) | |
| tree | 0214e66ce78d708630935fe8e00dfa01d2cdaa8a /src/libsyntax_pos | |
| parent | d586d5d2f51489821b471f20959333558c24b129 (diff) | |
| download | rust-6c9f6a1afdd60603ddb7ab28755fbc134b7d4844.tar.gz rust-6c9f6a1afdd60603ddb7ab28755fbc134b7d4844.zip | |
Rename other occs of (Code/File)Map to Source(Map/File) #51574
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/analyze_source_file.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax_pos/analyze_source_file.rs b/src/libsyntax_pos/analyze_source_file.rs index e468aaac7a3..7bc9a1af62c 100644 --- a/src/libsyntax_pos/analyze_source_file.rs +++ b/src/libsyntax_pos/analyze_source_file.rs @@ -36,9 +36,9 @@ pub fn analyze_source_file( // it encounters. If that point is already outside the source_file, remove // it again. if let Some(&last_line_start) = lines.last() { - let file_map_end = source_file_start_pos + BytePos::from_usize(src.len()); - assert!(file_map_end >= last_line_start); - if last_line_start == file_map_end { + let source_file_end = source_file_start_pos + BytePos::from_usize(src.len()); + assert!(source_file_end >= last_line_start); + if last_line_start == source_file_end { lines.pop(); } } diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index 639155636ed..a780a38ff96 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -1266,9 +1266,9 @@ pub struct LocWithOpt { // used to be structural records. Better names, anyone? #[derive(Debug)] -pub struct SourceFileAndLine { pub fm: Lrc<SourceFile>, pub line: usize } +pub struct SourceFileAndLine { pub sf: Lrc<SourceFile>, pub line: usize } #[derive(Debug)] -pub struct SourceFileAndBytePos { pub fm: Lrc<SourceFile>, pub pos: BytePos } +pub struct SourceFileAndBytePos { pub sf: Lrc<SourceFile>, pub pos: BytePos } #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct LineInfo { @@ -1303,7 +1303,7 @@ pub struct MacroBacktrace { } // _____________________________________________________________________________ -// SpanLinesError, SpanSnippetError, DistinctSources, MalformedCodemapPositions +// SpanLinesError, SpanSnippetError, DistinctSources, MalformedSourceMapPositions // pub type FileLinesResult = Result<FileLines, SpanLinesError>; @@ -1318,7 +1318,7 @@ pub enum SpanLinesError { pub enum SpanSnippetError { IllFormedSpan(Span), DistinctSources(DistinctSources), - MalformedForCodemap(MalformedCodemapPositions), + MalformedForSourcemap(MalformedSourceMapPositions), SourceNotAvailable { filename: FileName } } @@ -1329,7 +1329,7 @@ pub struct DistinctSources { } #[derive(Clone, PartialEq, Eq, Debug)] -pub struct MalformedCodemapPositions { +pub struct MalformedSourceMapPositions { pub name: FileName, pub source_len: usize, pub begin_pos: BytePos, |
