Skip to content

Fix wording for out-of-crate macro error #36498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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