Skip to content

Commit d742894

Browse files
author
Jonathan Turner
committed
Fix wording for out-of-crate macro error
1 parent e2c64d1 commit d742894

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

src/librustc_errors/emitter.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ impl EmitterWriter {
473473
if spans_updated {
474474
children.push(SubDiagnostic {
475475
level: Level::Note,
476-
message: "this error originates in a macro from the standard library".to_string(),
476+
message:"this error originates in a macro outside of the current \
477+
crate".to_string(),
477478
span: MultiSpan::new(),
478479
render_span: None
479480
});

src/test/ui/codemap_tests/bad-format-args.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ error: requires at least a format string argument
44
12 | format!();
55
| ^^^^^^^^^^
66
|
7-
= note: this error originates in a macro from the standard library
7+
= note: this error originates in a macro outside of the current crate
88

99
error: expected token: `,`
1010
--> $DIR/bad-format-args.rs:13:5
1111
|
1212
13 | format!("" 1);
1313
| ^^^^^^^^^^^^^^
1414
|
15-
= note: this error originates in a macro from the standard library
15+
= note: this error originates in a macro outside of the current crate
1616

1717
error: expected token: `,`
1818
--> $DIR/bad-format-args.rs:14:5
1919
|
2020
14 | format!("", 1 1);
2121
| ^^^^^^^^^^^^^^^^^
2222
|
23-
= note: this error originates in a macro from the standard library
23+
= note: this error originates in a macro outside of the current crate
2424

2525
error: aborting due to 3 previous errors
2626

src/test/ui/codemap_tests/issue-28308.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: cannot apply unary operator `!` to type `&'static str`
44
12 | assert!("foo");
55
| ^^^^^^^^^^^^^^^
66
|
7-
= note: this error originates in a macro from the standard library
7+
= note: this error originates in a macro outside of the current crate
88

99
error: aborting due to previous error
1010

src/test/ui/codemap_tests/repair_span_std_macros.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0282]: unable to infer enough type information about `_`
55
| ^^^^^^ cannot infer type for `_`
66
|
77
= note: type annotations or generic parameter binding required
8-
= note: this error originates in a macro from the standard library
8+
= note: this error originates in a macro outside of the current crate
99

1010
error: aborting due to previous error
1111

src/test/ui/cross-crate-macro-backtrace/main.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: invalid reference to argument `0` (no arguments given)
44
16 | myprintln!("{}"); //~ ERROR in this macro
55
| ^^^^^^^^^^^^^^^^^
66
|
7-
= note: this error originates in a macro from the standard library
7+
= note: this error originates in a macro outside of the current crate
88

99
error: aborting due to previous error
1010

0 commit comments

Comments
 (0)