]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/issue-98466.stderr
Rollup merge of #106714 - Ezrashaw:remove-e0490, r=davidtwco
[rust.git] / tests / ui / macros / issue-98466.stderr
1 warning: named argument `_x` is not used by name
2   --> $DIR/issue-98466.rs:7:26
3    |
4 LL |     println!("_x is {}", _x = 5);
5    |                     --   ^^ this named argument is referred to by position in formatting string
6    |                     |
7    |                     this formatting argument uses named argument `_x` by position
8    |
9    = note: `#[warn(named_arguments_used_positionally)]` on by default
10 help: use the named argument by name to avoid ambiguity
11    |
12 LL |     println!("_x is {_x}", _x = 5);
13    |                      ++
14
15 warning: named argument `y` is not used by name
16   --> $DIR/issue-98466.rs:10:26
17    |
18 LL |     println!("_x is {}", y = _x);
19    |                     --   ^ this named argument is referred to by position in formatting string
20    |                     |
21    |                     this formatting argument uses named argument `y` by position
22    |
23 help: use the named argument by name to avoid ambiguity
24    |
25 LL |     println!("_x is {y}", y = _x);
26    |                      +
27
28 warning: named argument `y` is not used by name
29   --> $DIR/issue-98466.rs:13:83
30    |
31 LL |     println!("first positional arg {}, second positional arg {}, _x is {}", 1, 2, y = _x);
32    |                                                                        --         ^ this named argument is referred to by position in formatting string
33    |                                                                        |
34    |                                                                        this formatting argument uses named argument `y` by position
35    |
36 help: use the named argument by name to avoid ambiguity
37    |
38 LL |     println!("first positional arg {}, second positional arg {}, _x is {y}", 1, 2, y = _x);
39    |                                                                         +
40
41 warning: named argument `_x` is not used by name
42   --> $DIR/issue-98466.rs:19:34
43    |
44 LL |     let _f = format!("_x is {}", _x = 5);
45    |                             --   ^^ this named argument is referred to by position in formatting string
46    |                             |
47    |                             this formatting argument uses named argument `_x` by position
48    |
49 help: use the named argument by name to avoid ambiguity
50    |
51 LL |     let _f = format!("_x is {_x}", _x = 5);
52    |                              ++
53
54 warning: named argument `y` is not used by name
55   --> $DIR/issue-98466.rs:22:34
56    |
57 LL |     let _f = format!("_x is {}", y = _x);
58    |                             --   ^ this named argument is referred to by position in formatting string
59    |                             |
60    |                             this formatting argument uses named argument `y` by position
61    |
62 help: use the named argument by name to avoid ambiguity
63    |
64 LL |     let _f = format!("_x is {y}", y = _x);
65    |                              +
66
67 warning: named argument `y` is not used by name
68   --> $DIR/issue-98466.rs:25:91
69    |
70 LL |     let _f = format!("first positional arg {}, second positional arg {}, _x is {}", 1, 2, y = _x);
71    |                                                                                --         ^ this named argument is referred to by position in formatting string
72    |                                                                                |
73    |                                                                                this formatting argument uses named argument `y` by position
74    |
75 help: use the named argument by name to avoid ambiguity
76    |
77 LL |     let _f = format!("first positional arg {}, second positional arg {}, _x is {y}", 1, 2, y = _x);
78    |                                                                                 +
79
80 warning: 6 warnings emitted
81