@@ -81,23 +81,22 @@ declare_clippy_lint! {
81
81
/// # let var = 42;
82
82
/// # let width = 1;
83
83
/// # let prec = 2;
84
- /// format!("{}", var); // implied variables
85
- /// format!("{0}", var); // positional variables
86
- /// format!("{v}", v=var); // named variables
87
- /// format!("{0} {0}", var); // aliased variables
88
- /// format!("{0:1$}", var, width); // width support
89
- /// format!("{0:.1$}", var, prec); // precision support
90
- /// format!("{:.*}", prec, var); // asterisk support
84
+ /// format!("{}", var);
85
+ /// format!("{v:?}", v = var);
86
+ /// format!("{0} {0}", var);
87
+ /// format!("{0:1$}", var, width);
88
+ /// format!("{:.*}", prec, var);
91
89
/// ```
92
90
/// Use instead:
93
91
/// ```rust
94
92
/// # let var = 42;
95
93
/// # let width = 1;
96
94
/// # let prec = 2;
97
- /// format!("{var}"); // implied, positional, and named variables
98
- /// format!("{var} {var}"); // aliased variables
99
- /// format!("{var:width$}"); // width support
100
- /// format!("{var:.prec$}"); // precision and asterisk support
95
+ /// format!("{var}");
96
+ /// format!("{var:?}");
97
+ /// format!("{var} {var}");
98
+ /// format!("{var:width$}");
99
+ /// format!("{var:.prec$}");
101
100
/// ```
102
101
///
103
102
/// ### Known Problems
0 commit comments