Fix wording for out-of-crate macro error

This commit is contained in:
Jonathan Turner 2016-09-15 10:12:56 -07:00
parent e2c64d1690
commit d7428944c2
5 changed files with 8 additions and 7 deletions

View file

@ -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
});

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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