about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorDonato Sciarra <sciarp@gmail.com>2018-08-18 12:14:09 +0200
committerDonato Sciarra <sciarp@gmail.com>2018-08-19 23:01:01 +0200
commitd3fe97f3d32b4cef1c22b6a5ba5326b1b195e262 (patch)
treeec538787f89f8b43016f8e799bfd7ff9762add48 /src/libsyntax/parse/lexer
parent82607d2cf3866c7cc31050548f2fbfa39207e319 (diff)
downloadrust-d3fe97f3d32b4cef1c22b6a5ba5326b1b195e262.tar.gz
rust-d3fe97f3d32b4cef1c22b6a5ba5326b1b195e262.zip
mv codemap() source_map()
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/comments.rs2
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs
index 67bc3d5e435..dde0466f43c 100644
--- a/src/libsyntax/parse/lexer/comments.rs
+++ b/src/libsyntax/parse/lexer/comments.rs
@@ -371,7 +371,7 @@ pub fn gather_comments_and_literals(sess: &ParseSess, path: FileName, srdr: &mut
 {
     let mut src = String::new();
     srdr.read_to_string(&mut src).unwrap();
-    let cm = SourceMap::new(sess.codemap().path_mapping().clone());
+    let cm = SourceMap::new(sess.source_map().path_mapping().clone());
     let source_file = cm.new_source_file(path, src);
     let mut rdr = lexer::StringReader::new_raw(sess, source_file, None);
 
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 7a8c46ad343..6cfa2b4abe8 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -234,8 +234,8 @@ impl<'a> StringReader<'a> {
     }
 
     pub fn retokenize(sess: &'a ParseSess, mut span: Span) -> Self {
-        let begin = sess.codemap().lookup_byte_offset(span.lo());
-        let end = sess.codemap().lookup_byte_offset(span.hi());
+        let begin = sess.source_map().lookup_byte_offset(span.lo());
+        let end = sess.source_map().lookup_byte_offset(span.hi());
 
         // Make the range zero-length if the span is invalid.
         if span.lo() > span.hi() || begin.fm.start_pos != end.fm.start_pos {