about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorAlex Burka <alex@alexburka.com>2017-10-27 04:50:54 +0000
committerAlex Burka <alex@alexburka.com>2017-11-19 22:22:22 +0000
commitbcd1fedf034b8735605b390f3a4d75b65162b514 (patch)
tree52adbeb88fd6168e6ca451c34ebc79885b25a206 /src/librustc_errors
parentc73bcf043e94b32e2d53ecfd3e53a0535b320456 (diff)
downloadrust-bcd1fedf034b8735605b390f3a4d75b65162b514.tar.gz
rust-bcd1fedf034b8735605b390f3a4d75b65162b514.zip
add UI test
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/emitter.rs9
1 files changed, 6 insertions, 3 deletions
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 {