about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-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();