From d06a4ded13b948a6a5b546514ccc7009097f145a Mon Sep 17 00:00:00 2001 From: Andy Russell Date: Sun, 3 Nov 2019 12:04:01 -0500 Subject: use silent emitter for rustdoc highlighting pass --- src/librustdoc/html/highlight.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html') diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 30c9453a643..88ba13f2796 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -11,7 +11,7 @@ use std::fmt::Display; use std::io; use std::io::prelude::*; -use syntax::source_map::{SourceMap, FilePathMapping}; +use syntax::source_map::SourceMap; use syntax::parse::lexer; use syntax::parse::token::{self, Token}; use syntax::sess::ParseSess; @@ -33,7 +33,7 @@ pub fn render_with_highlighting( class, tooltip).unwrap(); } - let sess = ParseSess::new(FilePathMapping::empty()); + let sess = ParseSess::with_silent_emitter(); let fm = sess.source_map().new_source_file( FileName::Custom(String::from("rustdoc-highlighting")), src.to_owned(), -- cgit 1.4.1-3-g733a5