Reformat using the new identifier sorting from rustfmt
This commit is contained in:
@@ -9,11 +9,11 @@ use rustc_session::lint::FutureIncompatibilityReason;
|
||||
use rustc_session::{declare_lint, declare_lint_pass};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::symbol::kw;
|
||||
use rustc_span::{hygiene, sym, InnerSpan, Span, Symbol};
|
||||
use rustc_span::{InnerSpan, Span, Symbol, hygiene, sym};
|
||||
use rustc_trait_selection::infer::InferCtxtExt;
|
||||
|
||||
use crate::lints::{NonFmtPanicBraces, NonFmtPanicUnused};
|
||||
use crate::{fluent_generated as fluent, LateContext, LateLintPass, LintContext};
|
||||
use crate::{LateContext, LateLintPass, LintContext, fluent_generated as fluent};
|
||||
|
||||
declare_lint! {
|
||||
/// The `non_fmt_panics` lint detects `panic!(..)` invocations where the first
|
||||
@@ -255,14 +255,10 @@ fn check_panic_str<'tcx>(
|
||||
.map(|span| fmt_span.from_inner(InnerSpan::new(span.start, span.end)))
|
||||
.collect(),
|
||||
};
|
||||
cx.emit_span_lint(
|
||||
NON_FMT_PANICS,
|
||||
arg_spans,
|
||||
NonFmtPanicUnused {
|
||||
count: n_arguments,
|
||||
suggestion: is_arg_inside_call(arg.span, span).then_some(arg.span),
|
||||
},
|
||||
);
|
||||
cx.emit_span_lint(NON_FMT_PANICS, arg_spans, NonFmtPanicUnused {
|
||||
count: n_arguments,
|
||||
suggestion: is_arg_inside_call(arg.span, span).then_some(arg.span),
|
||||
});
|
||||
} else {
|
||||
let brace_spans: Option<Vec<_>> =
|
||||
snippet.filter(|s| s.starts_with('"') || s.starts_with("r#")).map(|s| {
|
||||
|
||||
Reference in New Issue
Block a user