You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// `print!("{0:1$}", var, width)` | `print!("{var:width$}")` | width support
98
-
/// `print!("{0:.1$}", var, prec)` | `print!("{var:.prec$}")` | precision support
99
-
/// `print!("{:.*}", prec, var)` | `print!("{var:.prec$}")` | asterisk support
105
+
/// Format string uses an indexed argument that cannot be inlined.
106
+
/// Supporting this case requires re-indexing of the format string.
100
107
///
101
-
/// ### Unsupported cases
102
-
///
103
-
/// code | suggestion | comment
104
-
/// ---|---|---
105
-
/// `print!("{0}={1}", var, 1+2)` | `print!("{var}={0}", 1+2)` | Format string uses an indexed argument that cannot be inlined. Supporting this case requires re-indexing of the format string.
108
+
/// Until implemnted, `print!("{0}={1}", var, 1+2)` should be changed to `print!("{var}={0}", 1+2)` by hand.
106
109
///
107
110
/// changelog: [`needless-format-args`]: A new lint to inline format arguments, i.e. `print!("{}", var)` into `print!("{var}")`
`print!("{0:1$}", var, width)` | `print!("{var:width$}")` | width support
28
-
`print!("{0:.1$}", var, prec)` | `print!("{var:.prec$}")` | precision support
29
-
`print!("{:.*}", prec, var)` | `print!("{var:.prec$}")` | asterisk support
30
+
Format string uses an indexed argument that cannot be inlined.
31
+
Supporting this case requires re-indexing of the format string.
30
32
31
-
### Unsupported cases
32
-
33
-
code | suggestion | comment
34
-
---|---|---
35
-
`print!("{0}={1}", var, 1+2)` | `print!("{var}={0}", 1+2)` | Format string uses an indexed argument that cannot be inlined. Supporting this case requires re-indexing of the format string.
33
+
Until implemnted, `print!("{0}={1}", var, 1+2)` should be changed to `print!("{var}={0}", 1+2)` by hand.
36
34
37
35
changelog: [`needless-format-args`]: A new lint to inline format arguments, i.e. `print!("{}", var)` into `print!("{var}")`
0 commit comments