File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 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]);
6464
6565impl < ' tcx > LateLintPass < ' tcx > for FromOverInto {
6666 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-
7167 if let ItemKind :: Impl ( Impl {
7268 of_trait : Some ( hir_trait_ref) ,
7369 self_ty,
@@ -77,6 +73,8 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
7773 && let Some ( into_trait_seg) = hir_trait_ref. path . segments . last ( )
7874 // `impl Into<target_ty> for self_ty`
7975 && 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 )
8078 && let Some ( middle_trait_ref) = cx. tcx . impl_trait_ref ( item. owner_id )
8179 . map ( ty:: EarlyBinder :: instantiate_identity)
8280 && cx. tcx . is_diagnostic_item ( sym:: Into , middle_trait_ref. def_id )
You can’t perform that action at this time.
0 commit comments