From d7428944c20ab212a05d4e855fd233ed7e09e4a9 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Thu, 15 Sep 2016 10:12:56 -0700 Subject: [PATCH] Fix wording for out-of-crate macro error --- src/librustc_errors/emitter.rs | 3 ++- src/test/ui/codemap_tests/bad-format-args.stderr | 6 +++--- src/test/ui/codemap_tests/issue-28308.stderr | 2 +- src/test/ui/codemap_tests/repair_span_std_macros.stderr | 2 +- src/test/ui/cross-crate-macro-backtrace/main.stderr | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 1bdc9ef3088..6456b72dfb5 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -473,7 +473,8 @@ impl EmitterWriter { if spans_updated { children.push(SubDiagnostic { level: Level::Note, - message: "this error originates in a macro from the standard library".to_string(), + message:"this error originates in a macro outside of the current \ + crate".to_string(), span: MultiSpan::new(), render_span: None }); diff --git a/src/test/ui/codemap_tests/bad-format-args.stderr b/src/test/ui/codemap_tests/bad-format-args.stderr index fab8e2c8ce1..87255dfe774 100644 --- a/src/test/ui/codemap_tests/bad-format-args.stderr +++ b/src/test/ui/codemap_tests/bad-format-args.stderr @@ -4,7 +4,7 @@ error: requires at least a format string argument 12 | format!(); | ^^^^^^^^^^ | - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: expected token: `,` --> $DIR/bad-format-args.rs:13:5 @@ -12,7 +12,7 @@ error: expected token: `,` 13 | format!("" 1); | ^^^^^^^^^^^^^^ | - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: expected token: `,` --> $DIR/bad-format-args.rs:14:5 @@ -20,7 +20,7 @@ error: expected token: `,` 14 | format!("", 1 1); | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: aborting due to 3 previous errors diff --git a/src/test/ui/codemap_tests/issue-28308.stderr b/src/test/ui/codemap_tests/issue-28308.stderr index 0d51a3f36e9..d65b34f3f41 100644 --- a/src/test/ui/codemap_tests/issue-28308.stderr +++ b/src/test/ui/codemap_tests/issue-28308.stderr @@ -4,7 +4,7 @@ error: cannot apply unary operator `!` to type `&'static str` 12 | assert!("foo"); | ^^^^^^^^^^^^^^^ | - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/repair_span_std_macros.stderr b/src/test/ui/codemap_tests/repair_span_std_macros.stderr index 1c9cbd63c33..73a1c5bae85 100644 --- a/src/test/ui/codemap_tests/repair_span_std_macros.stderr +++ b/src/test/ui/codemap_tests/repair_span_std_macros.stderr @@ -5,7 +5,7 @@ error[E0282]: unable to infer enough type information about `_` | ^^^^^^ cannot infer type for `_` | = note: type annotations or generic parameter binding required - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: aborting due to previous error diff --git a/src/test/ui/cross-crate-macro-backtrace/main.stderr b/src/test/ui/cross-crate-macro-backtrace/main.stderr index fceaa70288c..84db85ac092 100644 --- a/src/test/ui/cross-crate-macro-backtrace/main.stderr +++ b/src/test/ui/cross-crate-macro-backtrace/main.stderr @@ -4,7 +4,7 @@ error: invalid reference to argument `0` (no arguments given) 16 | myprintln!("{}"); //~ ERROR in this macro | ^^^^^^^^^^^^^^^^^ | - = note: this error originates in a macro from the standard library + = note: this error originates in a macro outside of the current crate error: aborting due to previous error