@@ -425,7 +425,7 @@ impl<'a> LoweringContext<'a> {
425425
426426 impl < ' tcx , ' interner > Visitor < ' tcx > for MiscCollector < ' tcx , ' interner > {
427427 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 {
429429 // Doesn't generate a HIR node
430430 } else if let Some ( owner) = self . hir_id_owner {
431431 self . lctx . lower_node_id_with_owner ( p. id , owner) ;
@@ -2095,7 +2095,7 @@ impl<'a> LoweringContext<'a> {
20952095 fn lower_fn_params_to_names ( & mut self , decl : & FnDecl ) -> hir:: HirVec < Ident > {
20962096 decl. inputs
20972097 . iter ( )
2098- . map ( |param| match param. pat . node {
2098+ . map ( |param| match param. pat . kind {
20992099 PatKind :: Ident ( _, ident, _) => ident,
21002100 _ => Ident :: new ( kw:: Invalid , param. pat . span ) ,
21012101 } )
@@ -2172,7 +2172,7 @@ impl<'a> LoweringContext<'a> {
21722172 implicit_self : decl. inputs . get ( 0 ) . map_or (
21732173 hir:: ImplicitSelfKind :: None ,
21742174 |arg| {
2175- let is_mutable_pat = match arg. pat . node {
2175+ let is_mutable_pat = match arg. pat . kind {
21762176 PatKind :: Ident ( BindingMode :: ByValue ( mt) , _, _) |
21772177 PatKind :: Ident ( BindingMode :: ByRef ( mt) , _, _) =>
21782178 mt == Mutability :: Mutable ,
@@ -2688,7 +2688,7 @@ impl<'a> LoweringContext<'a> {
26882688 }
26892689
26902690 fn lower_pat ( & mut self , p : & Pat ) -> P < hir:: Pat > {
2691- let node = match p. node {
2691+ let node = match p. kind {
26922692 PatKind :: Wild => hir:: PatKind :: Wild ,
26932693 PatKind :: Ident ( ref binding_mode, ident, ref sub) => {
26942694 let lower_sub = |this : & mut Self | sub. as_ref ( ) . map ( |x| this. lower_pat ( x) ) ;
@@ -2805,7 +2805,7 @@ impl<'a> LoweringContext<'a> {
28052805 let mut iter = pats. iter ( ) ;
28062806 while let Some ( pat) = iter. next ( ) {
28072807 // Interpret the first `((ref mut?)? x @)? ..` pattern as a subslice pattern.
2808- match pat. node {
2808+ match pat. kind {
28092809 PatKind :: Rest => {
28102810 prev_rest_span = Some ( pat. span ) ;
28112811 slice = Some ( self . pat_wild_with_node_id_of ( pat) ) ;
@@ -2827,7 +2827,7 @@ impl<'a> LoweringContext<'a> {
28272827
28282828 while let Some ( pat) = iter. next ( ) {
28292829 // 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 {
28312831 PatKind :: Rest => Some ( pat. span ) ,
28322832 PatKind :: Ident ( .., Some ( ref sub) ) if sub. is_rest ( ) => {
28332833 // The `HirValidator` is merciless; add a `_` pattern to avoid ICEs.
@@ -2884,10 +2884,10 @@ impl<'a> LoweringContext<'a> {
28842884 }
28852885
28862886 /// 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 > {
28882888 P ( hir:: Pat {
28892889 hir_id : self . lower_node_id ( p. id ) ,
2890- node ,
2890+ kind ,
28912891 span : p. span ,
28922892 } )
28932893 }
@@ -3112,7 +3112,7 @@ impl<'a> LoweringContext<'a> {
31123112 (
31133113 P ( hir:: Pat {
31143114 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 ) ,
31163116 span,
31173117 } ) ,
31183118 hir_id
@@ -3123,10 +3123,10 @@ impl<'a> LoweringContext<'a> {
31233123 self . pat ( span, hir:: PatKind :: Wild )
31243124 }
31253125
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 > {
31273127 P ( hir:: Pat {
31283128 hir_id : self . next_id ( ) ,
3129- node : pat ,
3129+ kind ,
31303130 span,
31313131 } )
31323132 }
0 commit comments