]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/if/ifmt-bad-arg.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / if / ifmt-bad-arg.stderr
index 11dcc3a6d232eb2ae76f12a0e9781046e7c7505a..c024094dd5610da186114734332eb165b6f2b31f 100644 (file)
@@ -138,13 +138,9 @@ error: duplicate argument named `foo`
   --> $DIR/ifmt-bad-arg.rs:40:33
    |
 LL |     format!("{foo}", foo=1, foo=2);
-   |                                 ^
-   |
-note: previously here
-  --> $DIR/ifmt-bad-arg.rs:40:26
-   |
-LL |     format!("{foo}", foo=1, foo=2);
-   |                          ^
+   |                          -      ^ duplicate argument
+   |                          |
+   |                          previously here
 
 error: positional arguments cannot follow named arguments
   --> $DIR/ifmt-bad-arg.rs:41:35
@@ -257,10 +253,10 @@ LL |     println!("{} {:07$} {}", 1, 3.2, 4);
    = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html
 
 error: unknown format trait `foo`
-  --> $DIR/ifmt-bad-arg.rs:86:24
+  --> $DIR/ifmt-bad-arg.rs:86:17
    |
 LL |     println!("{:foo}", 1);
-   |                        ^
+   |                 ^^^
    |
    = note: the only appropriate formatting traits are:
            - ``, which uses the `Display` trait
@@ -300,19 +296,19 @@ error[E0308]: mismatched types
   --> $DIR/ifmt-bad-arg.rs:78:32
    |
 LL |     println!("{} {:.*} {}", 1, 3.2, 4);
-   |                                ^^^ expected usize, found floating-point number
+   |                                ^^^ expected `usize`, found floating-point number
    |
-   = note: expected type `&usize`
-              found type `&{float}`
+   = note: expected reference `&usize`
+              found reference `&{float}`
 
 error[E0308]: mismatched types
   --> $DIR/ifmt-bad-arg.rs:81:35
    |
 LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
-   |                                   ^^^ expected usize, found floating-point number
+   |                                   ^^^ expected `usize`, found floating-point number
    |
-   = note: expected type `&usize`
-              found type `&{float}`
+   = note: expected reference `&usize`
+              found reference `&{float}`
 
 error: aborting due to 36 previous errors