Emit warning when named arguments are used positionally in format
Addresses Issue 98466 by emitting a warning if a named argument is used like a position argument (i.e. the name is not used in the string to be formatted). Fixes rust-lang#98466
This commit is contained in:
parent
c80dde43f9
commit
1219f72f90
10 changed files with 324 additions and 16 deletions
|
@ -467,6 +467,7 @@ pub enum BuiltinLintDiagnostics {
|
|||
/// If true, the lifetime will be fully elided.
|
||||
use_span: Option<(Span, bool)>,
|
||||
},
|
||||
NamedArgumentUsedPositionally(Span, Span, String),
|
||||
}
|
||||
|
||||
/// Lints that are buffered up early on in the `Session` before the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue