use silent emitter for rustdoc highlighting pass
This commit is contained in:
parent
b43a682259
commit
d06a4ded13
5 changed files with 19 additions and 79 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue