Amend wording of note
This commit is contained in:
parent
a1217cb29d
commit
1a0343217d
2 changed files with 3 additions and 3 deletions
|
|
@ -537,7 +537,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
|||
name
|
||||
));
|
||||
err.note(
|
||||
"for hygiene reasons format_args! cannot capture variables \
|
||||
"to avoid ambiguity format_args! cannot capture variables \
|
||||
when the format string is expanded from a macro",
|
||||
);
|
||||
} else if self.ecx.parse_sess().unstable_features.is_nightly_build() {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | format!(concat!("{foo}"));
|
|||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: did you intend to capture a variable `foo` from the surrounding scope?
|
||||
= note: for hygiene reasons format_args! cannot capture variables when the format string is expanded from a macro
|
||||
= note: to avoid ambiguity format_args! cannot capture variables when the format string is expanded from a macro
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: there is no argument named `bar`
|
||||
|
|
@ -15,7 +15,7 @@ LL | format!(concat!("{ba", "r} {}"), 1);
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: did you intend to capture a variable `bar` from the surrounding scope?
|
||||
= note: for hygiene reasons format_args! cannot capture variables when the format string is expanded from a macro
|
||||
= note: to avoid ambiguity format_args! cannot capture variables when the format string is expanded from a macro
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue