diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-09-24 00:15:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-24 00:15:44 +0200 |
| commit | f17bdb7eecfe6fa0863c71acd8f0590dbf03dcce (patch) | |
| tree | 23cfbd4e8597116e1f7313c36819ea5f2184f9dc /src | |
| parent | f45283b93e04fe8bfab8c6dfd7121ad17d524bec (diff) | |
| parent | d7428944c20ab212a05d4e855fd233ed7e09e4a9 (diff) | |
| download | rust-f17bdb7eecfe6fa0863c71acd8f0590dbf03dcce.tar.gz rust-f17bdb7eecfe6fa0863c71acd8f0590dbf03dcce.zip | |
Rollup merge of #36498 - jonathandturner:macro_std_lib, r=nikomatsakis
Fix wording for out-of-crate macro error This fixes the wording of the note for out-of-crate macro errors to fix https://github.com/rust-lang/rust/issues/36469 The previous wording came from older logic in the PR that was replaced without updating the note.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/bad-format-args.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/issue-28308.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/repair_span_std_macros.stderr | 2 | ||||
| -rw-r--r-- | 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 |
