diff options
| -rw-r--r-- | src/librustdoc/doctest.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 8ac24fdc8af..3f62dead33a 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -428,11 +428,13 @@ crate fn make_test( // Any errors in parsing should also appear when the doctest is compiled for real, so just // send all the errors that librustc_ast emits directly into a `Sink` instead of stderr. let sm = Lrc::new(SourceMap::new(FilePathMapping::empty())); + supports_color = + EmitterWriter::stderr(ColorConfig::Auto, None, false, false, Some(80), false) + .supports_color(); + let emitter = EmitterWriter::new(box io::sink(), None, false, false, false, None, false); - supports_color = emitter.supports_color(); - // FIXME(misdreavus): pass `-Z treat-err-as-bug` to the doctest parser let handler = Handler::with_emitter(false, None, box emitter); let sess = ParseSess::with_span_handler(handler, sm); |
