Update rustdoc
This commit is contained in:
parent
96404ee844
commit
dc8fec28cc
3 changed files with 6 additions and 4 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue