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.
This commit is contained in:
commit
f17bdb7eec
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue