fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.3 KiB53 linesraw
1error: there is no argument named `foo`
2  --> $DIR/format-args-capture-macro-hygiene.rs:15:13
3   |
4LL |     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
11error: there is no argument named `bar`
12  --> $DIR/format-args-capture-macro-hygiene.rs:16:13
13   |
14LL |     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
21error: there is no argument named `foo`
22  --> $DIR/format-args-capture-macro-hygiene.rs:7:13
23   |
24LL |     () => { "{foo}" }
25   |             ^^^^^^^
26...
27LL |     format!(def_site!());
28   |             ----------- in this macro invocation
29   |
30   = note: did you intend to capture a variable `foo` from the surrounding scope?
31   = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
32   = note: this error originates in the macro `def_site` (in Nightly builds, run with -Z macro-backtrace for more info)
33
34error: there is no argument named `foo`
35  --> $DIR/format-args-capture-macro-hygiene.rs:19:24
36   |
37LL |     format!(call_site!("{foo}"));
38   |                        ^^^^^^^
39   |
40   = note: did you intend to capture a variable `foo` from the surrounding scope?
41   = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
42
43error: there is no argument named `foo`
44  --> $DIR/format-args-capture-macro-hygiene.rs:21:34
45   |
46LL |     format!(foo_with_input_span!(""));
47   |                                  ^^
48   |
49   = note: did you intend to capture a variable `foo` from the surrounding scope?
50   = note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
51
52error: aborting due to 5 previous errors
53