@@ -83,15 +83,15 @@ pub trait MutVisitor: Sized {
8383 walk_use_tree ( self , use_tree) ;
8484 }
8585
86- fn visit_foreign_item ( & mut self , ni : & mut P < ForeignItem > ) {
86+ fn visit_foreign_item ( & mut self , ni : & mut ForeignItem ) {
8787 walk_item ( self , ni) ;
8888 }
8989
9090 fn flat_map_foreign_item ( & mut self , ni : P < ForeignItem > ) -> SmallVec < [ P < ForeignItem > ; 1 ] > {
9191 walk_flat_map_foreign_item ( self , ni)
9292 }
9393
94- fn visit_item ( & mut self , i : & mut P < Item > ) {
94+ fn visit_item ( & mut self , i : & mut Item ) {
9595 walk_item ( self , i) ;
9696 }
9797
@@ -111,7 +111,7 @@ pub trait MutVisitor: Sized {
111111 walk_flat_map_field_def ( self , fd)
112112 }
113113
114- fn visit_assoc_item ( & mut self , i : & mut P < AssocItem > , ctxt : AssocCtxt ) {
114+ fn visit_assoc_item ( & mut self , i : & mut AssocItem , ctxt : AssocCtxt ) {
115115 walk_assoc_item ( self , i, ctxt)
116116 }
117117
@@ -123,11 +123,11 @@ pub trait MutVisitor: Sized {
123123 walk_flat_map_assoc_item ( self , i, ctxt)
124124 }
125125
126- fn visit_contract ( & mut self , c : & mut P < FnContract > ) {
126+ fn visit_contract ( & mut self , c : & mut FnContract ) {
127127 walk_contract ( self , c) ;
128128 }
129129
130- fn visit_fn_decl ( & mut self , d : & mut P < FnDecl > ) {
130+ fn visit_fn_decl ( & mut self , d : & mut FnDecl ) {
131131 walk_fn_decl ( self , d) ;
132132 }
133133
@@ -144,7 +144,7 @@ pub trait MutVisitor: Sized {
144144 walk_closure_binder ( self , b) ;
145145 }
146146
147- fn visit_block ( & mut self , b : & mut P < Block > ) {
147+ fn visit_block ( & mut self , b : & mut Block ) {
148148 walk_block ( self , b) ;
149149 }
150150
@@ -160,21 +160,21 @@ pub trait MutVisitor: Sized {
160160 walk_flat_map_arm ( self , arm)
161161 }
162162
163- fn visit_pat ( & mut self , p : & mut P < Pat > ) {
163+ fn visit_pat ( & mut self , p : & mut Pat ) {
164164 walk_pat ( self , p) ;
165165 }
166166
167167 fn visit_anon_const ( & mut self , c : & mut AnonConst ) {
168168 walk_anon_const ( self , c) ;
169169 }
170170
171- fn visit_expr ( & mut self , e : & mut P < Expr > ) {
171+ fn visit_expr ( & mut self , e : & mut Expr ) {
172172 walk_expr ( self , e) ;
173173 }
174174
175175 /// This method is a hack to workaround unstable of `stmt_expr_attributes`.
176176 /// It can be removed once that feature is stabilized.
177- fn visit_method_receiver_expr ( & mut self , ex : & mut P < Expr > ) {
177+ fn visit_method_receiver_expr ( & mut self , ex : & mut Expr ) {
178178 self . visit_expr ( ex)
179179 }
180180
@@ -186,11 +186,11 @@ pub trait MutVisitor: Sized {
186186 walk_generic_arg ( self , arg) ;
187187 }
188188
189- fn visit_ty ( & mut self , t : & mut P < Ty > ) {
189+ fn visit_ty ( & mut self , t : & mut Ty ) {
190190 walk_ty ( self , t) ;
191191 }
192192
193- fn visit_ty_pat ( & mut self , t : & mut P < TyPat > ) {
193+ fn visit_ty_pat ( & mut self , t : & mut TyPat ) {
194194 walk_ty_pat ( self , t) ;
195195 }
196196
@@ -246,7 +246,7 @@ pub trait MutVisitor: Sized {
246246 walk_parenthesized_parameter_data ( self , p) ;
247247 }
248248
249- fn visit_local ( & mut self , l : & mut P < Local > ) {
249+ fn visit_local ( & mut self , l : & mut Local ) {
250250 walk_local ( self , l) ;
251251 }
252252
@@ -527,8 +527,8 @@ fn walk_assoc_item_constraint<T: MutVisitor>(
527527 vis. visit_span ( span) ;
528528}
529529
530- pub fn walk_ty < T : MutVisitor > ( vis : & mut T , ty : & mut P < Ty > ) {
531- let Ty { id, kind, span, tokens : _ } = ty. deref_mut ( ) ;
530+ pub fn walk_ty < T : MutVisitor > ( vis : & mut T , ty : & mut Ty ) {
531+ let Ty { id, kind, span, tokens : _ } = ty;
532532 vis. visit_id ( id) ;
533533 match kind {
534534 TyKind :: Err ( _guar) => { }
@@ -579,8 +579,8 @@ pub fn walk_ty<T: MutVisitor>(vis: &mut T, ty: &mut P<Ty>) {
579579 vis. visit_span ( span) ;
580580}
581581
582- pub fn walk_ty_pat < T : MutVisitor > ( vis : & mut T , ty : & mut P < TyPat > ) {
583- let TyPat { id, kind, span, tokens : _ } = ty. deref_mut ( ) ;
582+ pub fn walk_ty_pat < T : MutVisitor > ( vis : & mut T , ty : & mut TyPat ) {
583+ let TyPat { id, kind, span, tokens : _ } = ty;
584584 vis. visit_id ( id) ;
585585 match kind {
586586 TyPatKind :: Range ( start, end, _include_end) => {
@@ -671,8 +671,8 @@ fn walk_parenthesized_parameter_data<T: MutVisitor>(vis: &mut T, args: &mut Pare
671671 vis. visit_span ( inputs_span) ;
672672}
673673
674- fn walk_local < T : MutVisitor > ( vis : & mut T , local : & mut P < Local > ) {
675- let Local { id, super_, pat, ty, kind, span, colon_sp, attrs, tokens : _ } = local. deref_mut ( ) ;
674+ fn walk_local < T : MutVisitor > ( vis : & mut T , local : & mut Local ) {
675+ let Local { id, super_, pat, ty, kind, span, colon_sp, attrs, tokens : _ } = local;
676676 visit_opt ( super_, |sp| vis. visit_span ( sp) ) ;
677677 vis. visit_id ( id) ;
678678 visit_attrs ( vis, attrs) ;
@@ -809,8 +809,8 @@ fn walk_fn<T: MutVisitor>(vis: &mut T, kind: FnKind<'_>) {
809809 }
810810}
811811
812- fn walk_contract < T : MutVisitor > ( vis : & mut T , contract : & mut P < FnContract > ) {
813- let FnContract { requires, ensures } = contract. deref_mut ( ) ;
812+ fn walk_contract < T : MutVisitor > ( vis : & mut T , contract : & mut FnContract ) {
813+ let FnContract { requires, ensures } = contract;
814814 if let Some ( pred) = requires {
815815 vis. visit_expr ( pred) ;
816816 }
@@ -819,8 +819,8 @@ fn walk_contract<T: MutVisitor>(vis: &mut T, contract: &mut P<FnContract>) {
819819 }
820820}
821821
822- fn walk_fn_decl < T : MutVisitor > ( vis : & mut T , decl : & mut P < FnDecl > ) {
823- let FnDecl { inputs, output } = decl. deref_mut ( ) ;
822+ fn walk_fn_decl < T : MutVisitor > ( vis : & mut T , decl : & mut FnDecl ) {
823+ let FnDecl { inputs, output } = decl;
824824 inputs. flat_map_in_place ( |param| vis. flat_map_param ( param) ) ;
825825 vis. visit_fn_ret_ty ( output) ;
826826}
@@ -1023,8 +1023,8 @@ fn walk_mt<T: MutVisitor>(vis: &mut T, MutTy { ty, mutbl: _ }: &mut MutTy) {
10231023 vis. visit_ty ( ty) ;
10241024}
10251025
1026- pub fn walk_block < T : MutVisitor > ( vis : & mut T , block : & mut P < Block > ) {
1027- let Block { id, stmts, rules : _, span, tokens : _ } = block. deref_mut ( ) ;
1026+ pub fn walk_block < T : MutVisitor > ( vis : & mut T , block : & mut Block ) {
1027+ let Block { id, stmts, rules : _, span, tokens : _ } = block;
10281028 vis. visit_id ( id) ;
10291029 stmts. flat_map_in_place ( |stmt| vis. flat_map_stmt ( stmt) ) ;
10301030 vis. visit_span ( span) ;
@@ -1123,11 +1123,11 @@ pub fn walk_crate<T: MutVisitor>(vis: &mut T, krate: &mut Crate) {
11231123 vis. visit_span ( inject_use_span) ;
11241124}
11251125
1126- pub fn walk_item ( visitor : & mut impl MutVisitor , item : & mut P < Item < impl WalkItemKind < Ctxt = ( ) > > > ) {
1126+ pub fn walk_item ( visitor : & mut impl MutVisitor , item : & mut Item < impl WalkItemKind < Ctxt = ( ) > > ) {
11271127 walk_item_ctxt ( visitor, item, ( ) )
11281128}
11291129
1130- pub fn walk_assoc_item ( visitor : & mut impl MutVisitor , item : & mut P < AssocItem > , ctxt : AssocCtxt ) {
1130+ pub fn walk_assoc_item ( visitor : & mut impl MutVisitor , item : & mut AssocItem , ctxt : AssocCtxt ) {
11311131 walk_item_ctxt ( visitor, item, ctxt)
11321132}
11331133
@@ -1200,8 +1200,8 @@ impl WalkItemKind for ForeignItemKind {
12001200 }
12011201}
12021202
1203- pub fn walk_pat < T : MutVisitor > ( vis : & mut T , pat : & mut P < Pat > ) {
1204- let Pat { id, kind, span, tokens : _ } = pat. deref_mut ( ) ;
1203+ pub fn walk_pat < T : MutVisitor > ( vis : & mut T , pat : & mut Pat ) {
1204+ let Pat { id, kind, span, tokens : _ } = pat;
12051205 vis. visit_id ( id) ;
12061206 match kind {
12071207 PatKind :: Err ( _guar) => { }
0 commit comments