Skip to content

Commit 66359a7

Browse files
authored
Rollup merge of rust-lang#130635 - eholk:pin-reborrow-sugar, r=compiler-errors
Add `&pin (mut|const) T` type position sugar This adds parser support for `&pin mut T` and `&pin const T` references. These are desugared to `Pin<&mut T>` and `Pin<&T>` in the AST lowering phases. This PR currently includes rust-lang#130526 since that one is in the commit queue. Only the most recent commits (bd45002 and following) are new. Tracking: - rust-lang#130494 r? `@compiler-errors`
2 parents ea48cf3 + c038c30 commit 66359a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_utils/src/ast_utils.rs

+3
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)