1
Fork 0

Add sugar for &pin (const|mut) types

This commit is contained in:
Eric Holk 2024-09-20 12:09:18 -07:00
parent 7caad69253
commit ae698f8199
No known key found for this signature in database
GPG key ID: F1A772BB658A63E1
23 changed files with 284 additions and 63 deletions

View file

@ -3482,7 +3482,7 @@ struct LifetimeFinder<'ast> {
impl<'ast> Visitor<'ast> for LifetimeFinder<'ast> {
fn visit_ty(&mut self, t: &'ast Ty) {
if let TyKind::Ref(_, mut_ty) = &t.kind {
if let TyKind::Ref(_, mut_ty) | TyKind::PinnedRef(_, mut_ty) = &t.kind {
self.seen.push(t);
if t.span.lo() == self.lifetime.lo() {
self.found = Some(&mut_ty.ty);