File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
use clippy_utils:: diagnostics:: span_lint;
2
2
use clippy_utils:: sym;
3
3
use rustc_errors:: MultiSpan ;
4
- use rustc_hir:: * ;
4
+ use rustc_hir:: { AssocItemKind , Item , ItemKind } ;
5
5
use rustc_lint:: { LateContext , LateLintPass } ;
6
6
use rustc_session:: declare_lint_pass;
7
7
@@ -34,7 +34,7 @@ declare_clippy_lint! {
34
34
#[ clippy:: version = "1.88.0" ]
35
35
pub INFALLIBLE_TRY_FROM ,
36
36
nursery,
37
- "default lint description "
37
+ "TryFrom with infallible Error type "
38
38
}
39
39
declare_lint_pass ! ( InfallibleTryFrom => [ INFALLIBLE_TRY_FROM ] ) ;
40
40
@@ -52,7 +52,7 @@ impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom {
52
52
if ii. kind == AssocItemKind :: Type {
53
53
let ii_id = ii. id ;
54
54
let ii = cx. tcx . hir_impl_item ( ii. id ) ;
55
- if ii. ident . name . as_str ( ) != " Error" {
55
+ if ii. ident . name != sym :: Error {
56
56
continue ;
57
57
}
58
58
let ii_ty = ii. expect_type ( ) ;
You can’t perform that action at this time.
0 commit comments