diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-27 20:57:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-27 20:57:55 +0200 |
| commit | 7807f5f0cbea3fd5bd037dd9ab41b4cf941a983b (patch) | |
| tree | 8069750e3b4f8ef9f07def43ad7d846656c7fafd | |
| parent | 732f671c53a88cbbf06f0a3713497031e2a5d3ea (diff) | |
| parent | 7fdf35ed1cf7e374f6822ba980c48c77ba7fa9de (diff) | |
| download | rust-7807f5f0cbea3fd5bd037dd9ab41b4cf941a983b.tar.gz rust-7807f5f0cbea3fd5bd037dd9ab41b4cf941a983b.zip | |
Rollup merge of #141632 - fee1-dead-contrib:push-txmttkxvwqxl, r=oli-obk
remove `visit_mt` from `ast::mut_visit` doesn't look like anyone is using it.
| -rw-r--r-- | compiler/rustc_ast/src/mut_visit.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index 1b8c0ee1c09..a2e5e3b57fd 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -300,10 +300,6 @@ pub trait MutVisitor: Sized { walk_precise_capturing_arg(self, arg); } - fn visit_mt(&mut self, mt: &mut MutTy) { - walk_mt(self, mt); - } - fn visit_expr_field(&mut self, f: &mut ExprField) { walk_expr_field(self, f); } @@ -519,10 +515,10 @@ pub fn walk_ty<T: MutVisitor>(vis: &mut T, ty: &mut P<Ty>) { TyKind::Infer | TyKind::ImplicitSelf | TyKind::Dummy | TyKind::Never | TyKind::CVarArgs => { } TyKind::Slice(ty) => vis.visit_ty(ty), - TyKind::Ptr(mt) => vis.visit_mt(mt), - TyKind::Ref(lt, mt) | TyKind::PinnedRef(lt, mt) => { + TyKind::Ptr(MutTy { ty, mutbl: _ }) => vis.visit_ty(ty), + TyKind::Ref(lt, MutTy { ty, mutbl: _ }) | TyKind::PinnedRef(lt, MutTy { ty, mutbl: _ }) => { visit_opt(lt, |lt| vis.visit_lifetime(lt)); - vis.visit_mt(mt); + vis.visit_ty(ty); } TyKind::BareFn(bft) => { let BareFnTy { safety, ext: _, generic_params, decl, decl_span } = bft.deref_mut(); @@ -1003,10 +999,6 @@ pub fn walk_flat_map_expr_field<T: MutVisitor>( smallvec![f] } -fn walk_mt<T: MutVisitor>(vis: &mut T, MutTy { ty, mutbl: _ }: &mut MutTy) { - vis.visit_ty(ty); -} - pub fn walk_block<T: MutVisitor>(vis: &mut T, block: &mut P<Block>) { let Block { id, stmts, rules: _, span, tokens: _ } = block.deref_mut(); vis.visit_id(id); |
