]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/if/ifmt-bad-arg.stderr
Add `format_args_capture` feature
[rust.git] / src / test / ui / if / ifmt-bad-arg.stderr
index c024094dd5610da186114734332eb165b6f2b31f..cbcb1df49851a930553a93687ad6743f5218a955 100644 (file)
@@ -63,18 +63,27 @@ error: there is no argument named `foo`
    |
 LL |     format!("{} {foo} {} {bar} {}", 1, 2, 3);
    |                 ^^^^^
+   |
+   = note: did you intend to capture a variable `foo` from the surrounding scope?
+   = help: add `#![feature(format_args_capture)]` to the crate attributes to enable
 
 error: there is no argument named `bar`
   --> $DIR/ifmt-bad-arg.rs:27:26
    |
 LL |     format!("{} {foo} {} {bar} {}", 1, 2, 3);
    |                          ^^^^^
+   |
+   = note: did you intend to capture a variable `bar` from the surrounding scope?
+   = help: add `#![feature(format_args_capture)]` to the crate attributes to enable
 
 error: there is no argument named `foo`
   --> $DIR/ifmt-bad-arg.rs:31:14
    |
 LL |     format!("{foo}");
    |              ^^^^^
+   |
+   = note: did you intend to capture a variable `foo` from the surrounding scope?
+   = help: add `#![feature(format_args_capture)]` to the crate attributes to enable
 
 error: multiple unused formatting arguments
   --> $DIR/ifmt-bad-arg.rs:32:17
@@ -155,6 +164,9 @@ error: there is no argument named `valueb`
    |
 LL |     format!("{valuea} {valueb}", valuea=5, valuec=7);
    |                       ^^^^^^^^
+   |
+   = note: did you intend to capture a variable `valueb` from the surrounding scope?
+   = help: add `#![feature(format_args_capture)]` to the crate attributes to enable
 
 error: named argument never used
   --> $DIR/ifmt-bad-arg.rs:45:51
@@ -205,6 +217,9 @@ error: there is no argument named `foo`
    |
 LL |         {foo}
    |         ^^^^^
+   |
+   = note: did you intend to capture a variable `foo` from the surrounding scope?
+   = help: add `#![feature(format_args_capture)]` to the crate attributes to enable
 
 error: invalid format string: expected `'}'`, found `'t'`
   --> $DIR/ifmt-bad-arg.rs:75:1
@@ -300,6 +315,7 @@ LL |     println!("{} {:.*} {}", 1, 3.2, 4);
    |
    = note: expected reference `&usize`
               found reference `&{float}`
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
   --> $DIR/ifmt-bad-arg.rs:81:35
@@ -309,6 +325,7 @@ LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
    |
    = note: expected reference `&usize`
               found reference `&{float}`
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 36 previous errors