Skip to content

Commit 1428d7c

Browse files
committed
fix dogfood lints
1 parent 5c0bd96 commit 1428d7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/infallible_try_from.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clippy_utils::diagnostics::span_lint;
22
use clippy_utils::sym;
33
use rustc_errors::MultiSpan;
4-
use rustc_hir::*;
4+
use rustc_hir::{AssocItemKind, Item, ItemKind};
55
use rustc_lint::{LateContext, LateLintPass};
66
use rustc_session::declare_lint_pass;
77

@@ -34,7 +34,7 @@ declare_clippy_lint! {
3434
#[clippy::version = "1.88.0"]
3535
pub INFALLIBLE_TRY_FROM,
3636
nursery,
37-
"default lint description"
37+
"TryFrom with infallible Error type"
3838
}
3939
declare_lint_pass!(InfallibleTryFrom => [INFALLIBLE_TRY_FROM]);
4040

@@ -52,7 +52,7 @@ impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom {
5252
if ii.kind == AssocItemKind::Type {
5353
let ii_id = ii.id;
5454
let ii = cx.tcx.hir_impl_item(ii.id);
55-
if ii.ident.name.as_str() != "Error" {
55+
if ii.ident.name != sym::Error {
5656
continue;
5757
}
5858
let ii_ty = ii.expect_type();

0 commit comments

Comments
 (0)