Add sugar for &pin (const|mut) types
This commit is contained in:
parent
7caad69253
commit
ae698f8199
23 changed files with 284 additions and 63 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue