Skip to content

Commit c038c30

Browse files
committed
Add sugar for &pin (const|mut) types
1 parent 65d941d commit c038c30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_utils/src/ast_utils.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,9 @@ pub fn eq_ty(l: &Ty, r: &Ty) -> bool {
753753
(Ref(ll, l), Ref(rl, r)) => {
754754
both(ll.as_ref(), rl.as_ref(), |l, r| eq_id(l.ident, r.ident)) && l.mutbl == r.mutbl && eq_ty(&l.ty, &r.ty)
755755
},
756+
(PinnedRef(ll, l), PinnedRef(rl, r)) => {
757+
both(ll.as_ref(), rl.as_ref(), |l, r| eq_id(l.ident, r.ident)) && l.mutbl == r.mutbl && eq_ty(&l.ty, &r.ty)
758+
},
756759
(BareFn(l), BareFn(r)) => {
757760
l.safety == r.safety
758761
&& eq_ext(&l.ext, &r.ext)

0 commit comments

Comments
 (0)