]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fmt/format-args-capture-macro-hygiene.stderr
Rollup merge of #85766 - workingjubilee:file-options, r=yaahc
[rust.git] / src / test / ui / fmt / format-args-capture-macro-hygiene.stderr
1 error: there is no argument named `foo`
2   --> $DIR/format-args-capture-macro-hygiene.rs:2:13
3    |
4 LL |     format!(concat!("{foo}"));
5    |             ^^^^^^^^^^^^^^^^
6    |
7    = note: did you intend to capture a variable `foo` from the surrounding scope?
8    = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
9    = note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
10
11 error: there is no argument named `bar`
12   --> $DIR/format-args-capture-macro-hygiene.rs:3:13
13    |
14 LL |     format!(concat!("{ba", "r} {}"), 1);
15    |             ^^^^^^^^^^^^^^^^^^^^^^^
16    |
17    = note: did you intend to capture a variable `bar` from the surrounding scope?
18    = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
19    = note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)
20
21 error: aborting due to 2 previous errors
22