@@ -425,7 +425,7 @@ impl<'a> LoweringContext<'a> {
425
425
426
426
impl < ' tcx , ' interner > Visitor < ' tcx > for MiscCollector < ' tcx , ' interner > {
427
427
fn visit_pat ( & mut self , p : & ' tcx Pat ) {
428
- if let PatKind :: Paren ( ..) | PatKind :: Rest = p. node {
428
+ if let PatKind :: Paren ( ..) | PatKind :: Rest = p. kind {
429
429
// Doesn't generate a HIR node
430
430
} else if let Some ( owner) = self . hir_id_owner {
431
431
self . lctx . lower_node_id_with_owner ( p. id , owner) ;
@@ -2095,7 +2095,7 @@ impl<'a> LoweringContext<'a> {
2095
2095
fn lower_fn_params_to_names ( & mut self , decl : & FnDecl ) -> hir:: HirVec < Ident > {
2096
2096
decl. inputs
2097
2097
. iter ( )
2098
- . map ( |param| match param. pat . node {
2098
+ . map ( |param| match param. pat . kind {
2099
2099
PatKind :: Ident ( _, ident, _) => ident,
2100
2100
_ => Ident :: new ( kw:: Invalid , param. pat . span ) ,
2101
2101
} )
@@ -2172,7 +2172,7 @@ impl<'a> LoweringContext<'a> {
2172
2172
implicit_self : decl. inputs . get ( 0 ) . map_or (
2173
2173
hir:: ImplicitSelfKind :: None ,
2174
2174
|arg| {
2175
- let is_mutable_pat = match arg. pat . node {
2175
+ let is_mutable_pat = match arg. pat . kind {
2176
2176
PatKind :: Ident ( BindingMode :: ByValue ( mt) , _, _) |
2177
2177
PatKind :: Ident ( BindingMode :: ByRef ( mt) , _, _) =>
2178
2178
mt == Mutability :: Mutable ,
@@ -2688,7 +2688,7 @@ impl<'a> LoweringContext<'a> {
2688
2688
}
2689
2689
2690
2690
fn lower_pat ( & mut self , p : & Pat ) -> P < hir:: Pat > {
2691
- let node = match p. node {
2691
+ let node = match p. kind {
2692
2692
PatKind :: Wild => hir:: PatKind :: Wild ,
2693
2693
PatKind :: Ident ( ref binding_mode, ident, ref sub) => {
2694
2694
let lower_sub = |this : & mut Self | sub. as_ref ( ) . map ( |x| this. lower_pat ( x) ) ;
@@ -2805,7 +2805,7 @@ impl<'a> LoweringContext<'a> {
2805
2805
let mut iter = pats. iter ( ) ;
2806
2806
while let Some ( pat) = iter. next ( ) {
2807
2807
// Interpret the first `((ref mut?)? x @)? ..` pattern as a subslice pattern.
2808
- match pat. node {
2808
+ match pat. kind {
2809
2809
PatKind :: Rest => {
2810
2810
prev_rest_span = Some ( pat. span ) ;
2811
2811
slice = Some ( self . pat_wild_with_node_id_of ( pat) ) ;
@@ -2827,7 +2827,7 @@ impl<'a> LoweringContext<'a> {
2827
2827
2828
2828
while let Some ( pat) = iter. next ( ) {
2829
2829
// There was a previous subslice pattern; make sure we don't allow more.
2830
- let rest_span = match pat. node {
2830
+ let rest_span = match pat. kind {
2831
2831
PatKind :: Rest => Some ( pat. span ) ,
2832
2832
PatKind :: Ident ( .., Some ( ref sub) ) if sub. is_rest ( ) => {
2833
2833
// The `HirValidator` is merciless; add a `_` pattern to avoid ICEs.
@@ -2884,10 +2884,10 @@ impl<'a> LoweringContext<'a> {
2884
2884
}
2885
2885
2886
2886
/// Construct a `Pat` with the `HirId` of `p.id` lowered.
2887
- fn pat_with_node_id_of ( & mut self , p : & Pat , node : hir:: PatKind ) -> P < hir:: Pat > {
2887
+ fn pat_with_node_id_of ( & mut self , p : & Pat , kind : hir:: PatKind ) -> P < hir:: Pat > {
2888
2888
P ( hir:: Pat {
2889
2889
hir_id : self . lower_node_id ( p. id ) ,
2890
- node ,
2890
+ kind ,
2891
2891
span : p. span ,
2892
2892
} )
2893
2893
}
@@ -3112,7 +3112,7 @@ impl<'a> LoweringContext<'a> {
3112
3112
(
3113
3113
P ( hir:: Pat {
3114
3114
hir_id,
3115
- node : hir:: PatKind :: Binding ( bm, hir_id, ident. with_span_pos ( span) , None ) ,
3115
+ kind : hir:: PatKind :: Binding ( bm, hir_id, ident. with_span_pos ( span) , None ) ,
3116
3116
span,
3117
3117
} ) ,
3118
3118
hir_id
@@ -3123,10 +3123,10 @@ impl<'a> LoweringContext<'a> {
3123
3123
self . pat ( span, hir:: PatKind :: Wild )
3124
3124
}
3125
3125
3126
- fn pat ( & mut self , span : Span , pat : hir:: PatKind ) -> P < hir:: Pat > {
3126
+ fn pat ( & mut self , span : Span , kind : hir:: PatKind ) -> P < hir:: Pat > {
3127
3127
P ( hir:: Pat {
3128
3128
hir_id : self . next_id ( ) ,
3129
- node : pat ,
3129
+ kind ,
3130
3130
span,
3131
3131
} )
3132
3132
}
0 commit comments