auto merge of #12627 : alexcrichton/rust/issue-12623, r=brson
This helps prevent the unfortunate interleavings found in #12623.
This commit is contained in:
commit
cb498cc40d
8 changed files with 155 additions and 116 deletions
|
|
@ -930,7 +930,7 @@ pub fn build_session(sopts: @session::Options,
|
|||
-> Session {
|
||||
let codemap = @codemap::CodeMap::new();
|
||||
let diagnostic_handler =
|
||||
diagnostic::mk_handler();
|
||||
diagnostic::default_handler();
|
||||
let span_diagnostic_handler =
|
||||
diagnostic::mk_span_handler(diagnostic_handler, codemap);
|
||||
|
||||
|
|
@ -1148,7 +1148,8 @@ pub fn build_output_filenames(input: &Input,
|
|||
}
|
||||
|
||||
pub fn early_error(msg: &str) -> ! {
|
||||
diagnostic::DefaultEmitter.emit(None, msg, diagnostic::Fatal);
|
||||
let mut emitter = diagnostic::EmitterWriter::stderr();
|
||||
emitter.emit(None, msg, diagnostic::Fatal);
|
||||
fail!(diagnostic::FatalError);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,7 +384,8 @@ pub fn monitor(f: proc()) {
|
|||
Err(value) => {
|
||||
// Task failed without emitting a fatal diagnostic
|
||||
if !value.is::<diagnostic::FatalError>() {
|
||||
diagnostic::DefaultEmitter.emit(
|
||||
let mut emitter = diagnostic::EmitterWriter::stderr();
|
||||
emitter.emit(
|
||||
None,
|
||||
diagnostic::ice_msg("unexpected failure"),
|
||||
diagnostic::Error);
|
||||
|
|
@ -394,9 +395,7 @@ pub fn monitor(f: proc()) {
|
|||
this is a bug",
|
||||
];
|
||||
for note in xs.iter() {
|
||||
diagnostic::DefaultEmitter.emit(None,
|
||||
*note,
|
||||
diagnostic::Note)
|
||||
emitter.emit(None, *note, diagnostic::Note)
|
||||
}
|
||||
|
||||
println!("{}", r.read_to_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue