Skip to content

Commit

Permalink
Fix wording for out-of-crate macro error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Turner committed Sep 15, 2016
1 parent e2c64d1 commit d742894
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/librustc_errors/emitter.rs
Expand Up @@ -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
});
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/codemap_tests/bad-format-args.stderr
Expand Up @@ -4,23 +4,23 @@ 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
|
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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/issue-28308.stderr
Expand Up @@ -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

2 changes: 1 addition & 1 deletion src/test/ui/codemap_tests/repair_span_std_macros.stderr
Expand Up @@ -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

2 changes: 1 addition & 1 deletion src/test/ui/cross-crate-macro-backtrace/main.stderr
Expand Up @@ -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

0 comments on commit d742894

Please sign in to comment.