Skip to content

Commit 7390470

Browse files
committed
Remove P<> from visit_block
1 parent dee0f01 commit 7390470

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_ast/src/mut_visit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub trait MutVisitor: Sized {
160160
walk_closure_binder(self, b);
161161
}
162162

163-
fn visit_block(&mut self, b: &mut P<Block>) {
163+
fn visit_block(&mut self, b: &mut Block) {
164164
walk_block(self, b);
165165
}
166166

@@ -1164,8 +1164,8 @@ fn walk_mt<T: MutVisitor>(vis: &mut T, MutTy { ty, mutbl: _ }: &mut MutTy) {
11641164
vis.visit_ty(ty);
11651165
}
11661166

1167-
pub fn walk_block<T: MutVisitor>(vis: &mut T, block: &mut P<Block>) {
1168-
let Block { id, stmts, rules: _, span, tokens, could_be_bare_literal: _ } = block.deref_mut();
1167+
pub fn walk_block<T: MutVisitor>(vis: &mut T, block: &mut Block) {
1168+
let Block { id, stmts, rules: _, span, tokens, could_be_bare_literal: _ } = block;
11691169
vis.visit_id(id);
11701170
stmts.flat_map_in_place(|stmt| vis.flat_map_stmt(stmt));
11711171
visit_lazy_tts(vis, tokens);

compiler/rustc_expand/src/expand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
22042204
self.flat_map_node(AstNodeWrapper::new(node, OptExprTag))
22052205
}
22062206

2207-
fn visit_block(&mut self, node: &mut P<ast::Block>) {
2207+
fn visit_block(&mut self, node: &mut ast::Block) {
22082208
let orig_dir_ownership = mem::replace(
22092209
&mut self.cx.current_expansion.dir_ownership,
22102210
DirOwnership::UnownedViaBlock,

0 commit comments

Comments
 (0)