]> 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 3e5f5a6374216c1985efcd7cc210fc6b10a0918e..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