From 6c9f6a1afdd60603ddb7ab28755fbc134b7d4844 Mon Sep 17 00:00:00 2001 From: David Lavati Date: Mon, 29 Oct 2018 21:26:13 +0100 Subject: Rename other occs of (Code/File)Map to Source(Map/File) #51574 --- src/libsyntax_pos/analyze_source_file.rs | 6 +++--- src/libsyntax_pos/lib.rs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax_pos') 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, pub line: usize } +pub struct SourceFileAndLine { pub sf: Lrc, pub line: usize } #[derive(Debug)] -pub struct SourceFileAndBytePos { pub fm: Lrc, pub pos: BytePos } +pub struct SourceFileAndBytePos { pub sf: Lrc, 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; @@ -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, -- cgit 1.4.1-3-g733a5