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::{
13
13
} ;
14
14
use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
15
15
use rustc_middle:: hir:: map:: Map ;
16
- use rustc_middle:: ty:: { AssocKind , Ty } ;
16
+ use rustc_middle:: ty:: { AssocKind , Ty , TyS } ;
17
17
use rustc_semver:: RustcVersion ;
18
18
use rustc_session:: { declare_tool_lint, impl_lint_pass} ;
19
19
use rustc_span:: { BytePos , Span } ;
@@ -452,7 +452,7 @@ fn in_impl(cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'_>) -> bool {
452
452
453
453
fn should_lint_ty ( hir_ty : & hir:: Ty < ' _ > , ty : Ty < ' _ > , self_ty : Ty < ' _ > ) -> bool {
454
454
if_chain ! {
455
- if ty == self_ty;
455
+ if TyS :: same_type ( ty , self_ty) ;
456
456
if let TyKind :: Path ( QPath :: Resolved ( _, path) ) = hir_ty. kind;
457
457
then {
458
458
!matches!( path. res, def:: Res :: SelfTy ( ..) )
You can’t perform that action at this time.
0 commit comments