about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-06 03:28:11 +0100
committerGitHub <noreply@github.com>2019-11-06 03:28:11 +0100
commitf5c54896b9ff6bd62ffd3c8b9d2b2c4e7461d380 (patch)
tree54e565376f1c1353187e785851d01369c059e386 /src/librustdoc
parente5da1a12e745e0d92cfae421673faac4fd5e4069 (diff)
parentd06a4ded13b948a6a5b546514ccc7009097f145a (diff)
downloadrust-f5c54896b9ff6bd62ffd3c8b9d2b2c4e7461d380.tar.gz
rust-f5c54896b9ff6bd62ffd3c8b9d2b2c4e7461d380.zip
Rollup merge of #66068 - euclio:null-emitter, r=estebank
use silent emitter for rustdoc highlighting pass

Partially addresses #63284.
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/html/highlight.rs4
1 files changed, 2 insertions, 2 deletions
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(),