mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 21:23:20 +00:00
Update test output
This commit is contained in:
parent
8c9bfaa5f3
commit
afa719e2ee
@ -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}"));
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
@ -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);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,5 +1,5 @@
|
||||
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
|
||||
@ -7,37 +7,37 @@ LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
|
||||
| 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
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -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: {}
|
||||
|
@ -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
|
||||
|
|
||||
@ -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
|
||||
|
|
||||
@ -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
|
||||
|
|
||||
@ -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
|
||||
|
|
||||
@ -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`.
|
||||
|
Loading…
Reference in New Issue
Block a user