File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use rustc_hir::{
1313} ;
1414use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
1515use rustc_middle:: hir:: map:: Map ;
16- use rustc_middle:: ty:: { AssocKind , Ty } ;
16+ use rustc_middle:: ty:: { AssocKind , Ty , TyS } ;
1717use rustc_semver:: RustcVersion ;
1818use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
1919use rustc_span:: { BytePos , Span } ;
@@ -452,7 +452,7 @@ fn in_impl(cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'_>) -> bool {
452452
453453fn should_lint_ty ( hir_ty : & hir:: Ty < ' _ > , ty : Ty < ' _ > , self_ty : Ty < ' _ > ) -> bool {
454454 if_chain ! {
455- if ty == self_ty;
455+ if TyS :: same_type ( ty , self_ty) ;
456456 if let TyKind :: Path ( QPath :: Resolved ( _, path) ) = hir_ty. kind;
457457 then {
458458 !matches!( path. res, def:: Res :: SelfTy ( ..) )
You can’t perform that action at this time.
0 commit comments