File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,6 @@ impl_lint_pass!(FromOverInto => [FROM_OVER_INTO]);
64
64
65
65
impl < ' tcx > LateLintPass < ' tcx > for FromOverInto {
66
66
fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
67
- if !self . msrv . meets ( msrvs:: RE_REBALANCING_COHERENCE ) || !span_is_local ( item. span ) {
68
- return ;
69
- }
70
-
71
67
if let ItemKind :: Impl ( Impl {
72
68
of_trait : Some ( hir_trait_ref) ,
73
69
self_ty,
@@ -77,6 +73,8 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
77
73
&& let Some ( into_trait_seg) = hir_trait_ref. path . segments . last ( )
78
74
// `impl Into<target_ty> for self_ty`
79
75
&& let Some ( GenericArgs { args : [ GenericArg :: Type ( target_ty) ] , .. } ) = into_trait_seg. args
76
+ && self . msrv . meets ( msrvs:: RE_REBALANCING_COHERENCE )
77
+ && span_is_local ( item. span )
80
78
&& let Some ( middle_trait_ref) = cx. tcx . impl_trait_ref ( item. owner_id )
81
79
. map ( ty:: EarlyBinder :: instantiate_identity)
82
80
&& cx. tcx . is_diagnostic_item ( sym:: Into , middle_trait_ref. def_id )
You can’t perform that action at this time.
0 commit comments