1
Fork 0

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:
Preston From 2022-06-24 23:52:13 -06:00
parent c80dde43f9
commit 1219f72f90
10 changed files with 324 additions and 16 deletions

View file

@ -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