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
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);