rustdoc: Capture all output from rustc by default
This helps prevent interleaving of error messages when running rustdoc tests. This has an interesting bit of shuffling with I/O handles, but other than that this is just using the APIs laid out in the previous commit. Closes #12623
This commit is contained in:
parent
324547140e
commit
0e1a860789
4 changed files with 33 additions and 5 deletions
|
@ -28,7 +28,7 @@ use t = syntax::parse::token;
|
|||
/// Highlights some source code, returning the HTML output.
|
||||
pub fn highlight(src: &str) -> ~str {
|
||||
let sess = parse::new_parse_sess();
|
||||
let handler = diagnostic::mk_handler();
|
||||
let handler = diagnostic::default_handler();
|
||||
let span_handler = diagnostic::mk_span_handler(handler, sess.cm);
|
||||
let fm = parse::string_to_filemap(sess, src.to_owned(), ~"<stdin>");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue