From bcd1fedf034b8735605b390f3a4d75b65162b514 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Fri, 27 Oct 2017 04:50:54 +0000 Subject: add UI test --- src/librustc_errors/emitter.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/librustc_errors') diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 7ce902d0a6f..41672d89486 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -795,8 +795,11 @@ impl EmitterWriter { if spans_updated { children.push(SubDiagnostic { level: Level::Note, - message: vec![("this error originates in a macro outside of the current crate (run with RUST_MACRO_BACKTRACE=1 for more info)" - .to_string(), Style::NoStyle)], + message: vec![ + (["this error originates in a macro outside of the current crate", + "(run with RUST_MACRO_BACKTRACE=1 for more info)"].join(" "), + Style::NoStyle), + ], span: MultiSpan::new(), render_span: None, }); @@ -1242,7 +1245,7 @@ impl EmitterWriter { if let Some(ref cm) = self.cm { for trace in sp.macro_backtrace().iter().rev() { let line_offset = buffer.num_lines(); - + let mut diag_string = format!("in this expansion of {}", trace.macro_decl_name); if let Some(def_site_span) = trace.def_site_span { -- cgit 1.4.1-3-g733a5