about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-09-26 16:18:31 +0100
committervarkor <github@varkor.com>2019-09-26 18:21:09 +0100
commit8bd0382134368d8bc017185baba9e5276693ef6a (patch)
tree6541f5e3f12613a63d7a030feeb980a56e738663 /src/libsyntax/parse/parser
parent95f6d72a60461a4a432d7e8971bb6a1899456b56 (diff)
downloadrust-8bd0382134368d8bc017185baba9e5276693ef6a.tar.gz
rust-8bd0382134368d8bc017185baba9e5276693ef6a.zip
Rename `Pat.node` to `Pat.kind`
Diffstat (limited to 'src/libsyntax/parse/parser')
-rw-r--r--src/libsyntax/parse/parser/pat.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser/pat.rs b/src/libsyntax/parse/parser/pat.rs
index 3c624959ead..de72f1c4d49 100644
--- a/src/libsyntax/parse/parser/pat.rs
+++ b/src/libsyntax/parse/parser/pat.rs
@@ -66,7 +66,7 @@ impl<'a> Parser<'a> {
         self.recover_leading_vert("not allowed in a parameter pattern");
         let pat = self.parse_pat_with_or(PARAM_EXPECTED, GateOr::No, RecoverComma::No)?;
 
-        if let PatKind::Or(..) = &pat.node {
+        if let PatKind::Or(..) = &pat.kind {
             self.ban_illegal_fn_param_or_pat(&pat);
         }
 
@@ -324,7 +324,7 @@ impl<'a> Parser<'a> {
 
     /// Ban a range pattern if it has an ambiguous interpretation.
     fn ban_pat_range_if_ambiguous(&self, pat: &Pat) -> PResult<'a, ()> {
-        match pat.node {
+        match pat.kind {
             PatKind::Range(
                 .., Spanned { node: RangeEnd::Included(RangeSyntax::DotDotDot), .. }
             ) => return Ok(()),
@@ -399,12 +399,12 @@ impl<'a> Parser<'a> {
 
         // Unwrap; If we don't have `mut $ident`, error.
         let pat = pat.into_inner();
-        match &pat.node {
+        match &pat.kind {
             PatKind::Ident(..) => {}
             _ => self.ban_mut_general_pat(mut_span, &pat, changed_any_binding),
         }
 
-        Ok(pat.node)
+        Ok(pat.kind)
     }
 
     /// Recover on `mut ref? ident @ pat` and suggest
@@ -430,7 +430,7 @@ impl<'a> Parser<'a> {
         impl MutVisitor for AddMut {
             fn visit_pat(&mut self, pat: &mut P<Pat>) {
                 if let PatKind::Ident(BindingMode::ByValue(ref mut m @ Mutability::Immutable), ..)
-                    = pat.node
+                    = pat.kind
                 {
                     *m = Mutability::Mutable;
                     self.0 = true;
@@ -890,7 +890,7 @@ impl<'a> Parser<'a> {
         self.mk_pat(span, PatKind::Ident(bm, ident, None))
     }
 
-    fn mk_pat(&self, span: Span, node: PatKind) -> P<Pat> {
-        P(Pat { node, span, id: ast::DUMMY_NODE_ID })
+    fn mk_pat(&self, span: Span, kind: PatKind) -> P<Pat> {
+        P(Pat { kind, span, id: ast::DUMMY_NODE_ID })
     }
 }