about summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authorMaxim Zholobak <maxim.zholobak@grammarly.com>2020-02-22 16:07:05 +0200
committerMaxim Zholobak <maxim.zholobak@grammarly.com>2020-02-22 16:17:31 +0200
commit20c9a40fec886826a3e7c4ec0c33ea4692f2c6a8 (patch)
tree932068f21449f5ed9dbe9aef74563c1f072a54e3 /src/libsyntax/util
parent03d2f5cd6c634b1fdcd26b036009aa4dce37fdfc (diff)
Rename CodeMap to SourceMap follow up
Diffstat (limited to 'src/libsyntax/util')
-rw-r--r--src/libsyntax/util/comments.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/util/comments.rs b/src/libsyntax/util/comments.rs
index 5a67531624d..0e42ae11fa2 100644
--- a/src/libsyntax/util/comments.rs
+++ b/src/libsyntax/util/comments.rs
@@ -189,8 +189,8 @@ fn split_block_comment_into_lines(text: &str, col: CharPos) -> Vec<String> {
 // it appears this function is called only from pprust... that's
 // probably not a good thing.
 pub fn gather_comments(sm: &SourceMap, path: FileName, src: String) -> Vec<Comment> {
-    let cm = SourceMap::new(sm.path_mapping().clone());
-    let source_file = cm.new_source_file(path, src);
+    let sm = SourceMap::new(sm.path_mapping().clone());
+    let source_file = sm.new_source_file(path, src);
     let text = (*source_file.src.as_ref().unwrap()).clone();
 
     let text: &str = text.as_str();