diff options
Diffstat (limited to 'src/libsyntax/util/comments.rs')
| -rw-r--r-- | src/libsyntax/util/comments.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/util/comments.rs b/src/libsyntax/util/comments.rs index c385b498ced..de33189884c 100644 --- a/src/libsyntax/util/comments.rs +++ b/src/libsyntax/util/comments.rs @@ -1,7 +1,6 @@ pub use CommentStyle::*; use crate::ast; -use crate::sess::ParseSess; use rustc_span::source_map::SourceMap; use rustc_span::{BytePos, CharPos, FileName, Pos}; @@ -191,8 +190,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. -crate fn gather_comments(sess: &ParseSess, path: FileName, src: String) -> Vec<Comment> { - let cm = SourceMap::new(sess.source_map().path_mapping().clone()); +crate 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 text = (*source_file.src.as_ref().unwrap()).clone(); |
