diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-03-12 14:47:45 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-04-02 16:14:58 +0200 |
| commit | dc8fec28cc46fc0a999fa3069ccdb4595cea9df3 (patch) | |
| tree | 4ddcd61b3459a93e1cb49e861fb2b0b0bbe6c720 /src | |
| parent | 96404ee8443c7475b3b6a7b9beb142e7e9354673 (diff) | |
| download | rust-dc8fec28cc46fc0a999fa3069ccdb4595cea9df3.tar.gz rust-dc8fec28cc46fc0a999fa3069ccdb4595cea9df3.zip | |
Update rustdoc
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/config.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/core.rs | 3 | ||||
| -rw-r--r-- | src/librustdoc/test.rs | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index f2682e00430..af5c95ea589 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -254,10 +254,11 @@ impl Options { (instead was `{}`)", arg)); } }; + // FIXME: deduplicate this code from the identical code in librustc/session/config.rs let error_format = match matches.opt_str("error-format").as_ref().map(|s| &s[..]) { Some("human") => ErrorOutputType::HumanReadable(color), - Some("json") => ErrorOutputType::Json(false), - Some("pretty-json") => ErrorOutputType::Json(true), + Some("json") => ErrorOutputType::Json { pretty: false, colorful_rendered: false }, + Some("pretty-json") => ErrorOutputType::Json { pretty: true, colorful_rendered: false }, Some("short") => ErrorOutputType::Short(color), None => ErrorOutputType::HumanReadable(color), Some(arg) => { diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 3cf6b32b07c..18bb5eef538 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -307,7 +307,7 @@ pub fn new_handler(error_format: ErrorOutputType, sessopts.debugging_opts.teach, ).ui_testing(ui_testing) ), - ErrorOutputType::Json(pretty) => { + ErrorOutputType::Json { pretty, colorful_rendered } => { let source_map = source_map.unwrap_or_else( || Lrc::new(source_map::SourceMap::new(sessopts.file_path_mapping()))); Box::new( @@ -315,6 +315,7 @@ pub fn new_handler(error_format: ErrorOutputType, None, source_map, pretty, + colorful_rendered, ).ui_testing(ui_testing) ) }, diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 0bbc7c5c4b2..abf74158c93 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -381,7 +381,7 @@ pub fn make_test(s: &str, // Any errors in parsing should also appear when the doctest is compiled for real, so just // send all the errors that libsyntax emits directly into a `Sink` instead of stderr. let cm = Lrc::new(SourceMap::new(FilePathMapping::empty())); - let emitter = EmitterWriter::new(box io::sink(), None, false, false); + let emitter = EmitterWriter::new(box io::sink(), None, false, false, false); let handler = Handler::with_emitter(false, None, box emitter); let sess = ParseSess::with_span_handler(handler, cm); |
