Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --Upon running , the compiler panics when having as a dependency. and complete without error. Probably this is related to ? <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: and : : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p: </p</details
Appears to be a duplicate of

Discussion:
use rustc_lint_defs::builtin::NAMED_ARGUMENTS_USED_POSITIONALLY; use rustc_lint_defs::{BufferedEarlyLint, BuiltinLintDiagnostics, LintId}; <del> use rustc_parse_format::{Count, FormatSpec}; </del> <ins> use rustc_parse_format::Count; </ins> use std::borrow::Cow; use std::collections::hash_map::Entry;

} _ => {} }; <del> match a.format { FormatSpec { width: Count::CountIsName(s, _), .. } | FormatSpec { precision: Count::CountIsName(s, _), .. } => { used_argument_names.insert(s); } _ => {} }; </del> <ins> if let Count::CountIsName(s, _) = a.format.width { used_argument_names.insert(s); } if let Count::CountIsName(s, _) = a.format.precision { used_argument_names.insert(s); } </ins> } } for (symbol, (index, span)) in names { if !used_argument_names.contains(symbol.as_str()) { let msg = format!("named argument `{}` is not used by name", symbol.as_str()); <del> let arg_span = cx.arg_spans[index]; </del> <ins> let arg_span = cx.arg_spans.get(index).copied(); </ins> cx.ecx.buffered_early_lint.push(BufferedEarlyLint { span: MultiSpan::from_span(span), msg: msg.clone(),

}, BuiltinLintDiagnostics::NamedArgumentUsedPositionally(positional_arg, named_arg, name) => { db.span_label(named_arg, "this named argument is only referred to by position in formatting string"); <del> let msg = format!("this formatting argument uses named argument `{}` by position", name); db.span_label(positional_arg, msg); db.span_suggestion_verbose( positional_arg, "use the named argument by name to avoid ambiguity", format!("{{{}}}", name), Applicability::MaybeIncorrect, ); </del> <ins> if let Some(positional_arg) = positional_arg { let msg = format!("this formatting argument uses named argument `{}` by position", name); db.span_label(positional_arg, msg); db.span_suggestion_verbose( positional_arg, "use the named argument by name to avoid ambiguity", format!("{{{}}}", name), Applicability::MaybeIncorrect, ); } </ins> } } // Rewrap `db`, and pass control to the user.

/// If true, the lifetime will be fully elided. use_span: Option<(Span, bool)>, }, <del> NamedArgumentUsedPositionally(Span, Span, String), </del> <ins> NamedArgumentUsedPositionally(Option<Span>, Span, String), </ins> } /// Lints that are buffered up early on in the `Session` before the

<ins> // check-pass #![deny(named_arguments_used_positionally)] fn main() { let value: f64 = 314.15926; let digits_before_decimal = 1; let digits_after_decimal = 2; let width = digits_before_decimal + 1 + digits_after_decimal; println!( "{value:0>width$.digits_after_decimal$}", value = value, width = width, digits_after_decimal = digits_after_decimal, ); } </ins>