Skip to content

Commit

Permalink
Update test output
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Nov 15, 2021
1 parent 8c9bfaa commit afa719e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/fmt/format-args-capture-macro-hygiene.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: there is no argument named `foo`
--> $DIR/format-args-capture-macro-hygiene.rs:4:13
--> $DIR/format-args-capture-macro-hygiene.rs:2:13
|
LL | format!(concat!("{foo}"));
| ^^^^^^^^^^^^^^^^
Expand All @@ -9,7 +9,7 @@ LL | format!(concat!("{foo}"));
= note: this error originates in the macro `concat` (in Nightly builds, run with -Z macro-backtrace for more info)

error: there is no argument named `bar`
--> $DIR/format-args-capture-macro-hygiene.rs:5:13
--> $DIR/format-args-capture-macro-hygiene.rs:3:13
|
LL | format!(concat!("{ba", "r} {}"), 1);
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
14 changes: 7 additions & 7 deletions src/test/ui/fmt/format-args-capture-missing-variables.stderr
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
error: named argument never used
--> $DIR/format-args-capture-missing-variables.rs:10:51
--> $DIR/format-args-capture-missing-variables.rs:8:51
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
| ------------------- ^ named argument never used
| |
| formatting specifier missing

error[E0425]: cannot find value `foo` in this scope
--> $DIR/format-args-capture-missing-variables.rs:4:17
--> $DIR/format-args-capture-missing-variables.rs:2:17
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^ not found in this scope

error[E0425]: cannot find value `bar` in this scope
--> $DIR/format-args-capture-missing-variables.rs:4:26
--> $DIR/format-args-capture-missing-variables.rs:2:26
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^ not found in this scope

error[E0425]: cannot find value `foo` in this scope
--> $DIR/format-args-capture-missing-variables.rs:8:14
--> $DIR/format-args-capture-missing-variables.rs:6:14
|
LL | format!("{foo}");
| ^^^^^ not found in this scope

error[E0425]: cannot find value `valueb` in this scope
--> $DIR/format-args-capture-missing-variables.rs:10:23
--> $DIR/format-args-capture-missing-variables.rs:8:23
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
| ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `foo` in this scope
--> $DIR/format-args-capture-missing-variables.rs:16:9
--> $DIR/format-args-capture-missing-variables.rs:14:9
|
LL | {foo}
| ^^^^^ not found in this scope

error[E0425]: cannot find value `foo` in this scope
--> $DIR/format-args-capture-missing-variables.rs:21:13
--> $DIR/format-args-capture-missing-variables.rs:19:13
|
LL | panic!("{foo} {bar}", bar=1);
| ^^^^^ not found in this scope
Expand Down
10 changes: 5 additions & 5 deletions src/test/ui/fmt/ifmt-bad-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ fn main() {
//~^ ERROR: invalid reference to positional arguments 3, 4 and 5 (there are 3 arguments)

format!("{} {foo} {} {bar} {}", 1, 2, 3);
//~^ ERROR: there is no argument named `foo`
//~^^ ERROR: there is no argument named `bar`
//~^ ERROR: cannot find value `foo` in this scope
//~^^ ERROR: cannot find value `bar` in this scope

format!("{foo}"); //~ ERROR: no argument named `foo`
format!("{foo}"); //~ ERROR: cannot find value `foo` in this scope
format!("", 1, 2); //~ ERROR: multiple unused formatting arguments
format!("{}", 1, 2); //~ ERROR: argument never used
format!("{1}", 1, 2); //~ ERROR: argument never used
Expand All @@ -43,7 +43,7 @@ fn main() {
// bad named arguments, #35082

format!("{valuea} {valueb}", valuea=5, valuec=7);
//~^ ERROR there is no argument named `valueb`
//~^ ERROR cannot find value `valueb` in this scope
//~^^ ERROR named argument never used

// bad syntax of the format string
Expand All @@ -60,7 +60,7 @@ fn main() {
{foo}
"##);
//~^^^ ERROR: there is no argument named `foo`
//~^^^ ERROR: cannot find value `foo` in this scope

// bad syntax in format string with multiple newlines, #53836
format!("first number: {}
Expand Down
68 changes: 32 additions & 36 deletions src/test/ui/fmt/ifmt-bad-arg.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,6 @@ LL | format!("{name} {value} {} {} {} {} {} {}", 0, name=1, value=2);
|
= note: positional arguments are zero-based

error: there is no argument named `foo`
--> $DIR/ifmt-bad-arg.rs:27:17
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^
|

error: there is no argument named `bar`
--> $DIR/ifmt-bad-arg.rs:27:26
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^
|

error: there is no argument named `foo`
--> $DIR/ifmt-bad-arg.rs:31:14
|
LL | format!("{foo}");
| ^^^^^
|

error: multiple unused formatting arguments
--> $DIR/ifmt-bad-arg.rs:32:17
|
Expand Down Expand Up @@ -153,13 +132,6 @@ LL | format!("{foo} {} {}", foo=1, 2);
| |
| named argument

error: there is no argument named `valueb`
--> $DIR/ifmt-bad-arg.rs:45:23
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
| ^^^^^^^^
|

error: named argument never used
--> $DIR/ifmt-bad-arg.rs:45:51
|
Expand Down Expand Up @@ -204,13 +176,6 @@ LL | format!("foo %s baz", "bar");
|
= note: printf formatting not supported; see the documentation for `std::fmt`

error: there is no argument named `foo`
--> $DIR/ifmt-bad-arg.rs:60:9
|
LL | {foo}
| ^^^^^
|

error: invalid format string: expected `'}'`, found `'t'`
--> $DIR/ifmt-bad-arg.rs:75:1
|
Expand Down Expand Up @@ -297,6 +262,36 @@ LL | println!("{:.*}");
= note: positional arguments are zero-based
= note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html

error[E0425]: cannot find value `foo` in this scope
--> $DIR/ifmt-bad-arg.rs:27:17
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^ not found in this scope

error[E0425]: cannot find value `bar` in this scope
--> $DIR/ifmt-bad-arg.rs:27:26
|
LL | format!("{} {foo} {} {bar} {}", 1, 2, 3);
| ^^^^^ not found in this scope

error[E0425]: cannot find value `foo` in this scope
--> $DIR/ifmt-bad-arg.rs:31:14
|
LL | format!("{foo}");
| ^^^^^ not found in this scope

error[E0425]: cannot find value `valueb` in this scope
--> $DIR/ifmt-bad-arg.rs:45:23
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
| ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `foo` in this scope
--> $DIR/ifmt-bad-arg.rs:60:9
|
LL | {foo}
| ^^^^^ not found in this scope

error[E0308]: mismatched types
--> $DIR/ifmt-bad-arg.rs:78:32
|
Expand All @@ -319,4 +314,5 @@ LL | println!("{} {:07$.*} {}", 1, 3.2, 4);

error: aborting due to 36 previous errors

For more information about this error, try `rustc --explain E0308`.
Some errors have detailed explanations: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.

0 comments on commit afa719e

Please sign in to comment.