about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-04 02:43:49 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-09-05 08:33:09 +0200
commita7db1a4861e33f89181511a2e19aaa38e37e7f7a (patch)
tree06703f16153806de6455e6a471bce65d21e5630d /src/libsyntax
parentd70b0c5d42e9c3cf6580a399c30d87fde48c1919 (diff)
downloadrust-a7db1a4861e33f89181511a2e19aaa38e37e7f7a.tar.gz
rust-a7db1a4861e33f89181511a2e19aaa38e37e7f7a.zip
or-patterns: address review comments.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs5
-rw-r--r--src/libsyntax/visit.rs2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index e0eaad0d1a7..c93e6d11ce7 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -563,7 +563,7 @@ impl Pat {
 
     /// Walk top-down and call `it` in each place where a pattern occurs
     /// starting with the root pattern `walk` is called on. If `it` returns
-    /// false then we will decend no further but siblings will be processed.
+    /// false then we will descend no further but siblings will be processed.
     pub fn walk(&self, it: &mut impl FnMut(&Pat) -> bool) {
         if !it(self) {
             return;
@@ -1150,9 +1150,6 @@ pub enum ExprKind {
     Type(P<Expr>, P<Ty>),
     /// A `let pat = expr` expression that is only semantically allowed in the condition
     /// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`).
-    ///
-    /// The `Vec<P<Pat>>` is for or-patterns at the top level.
-    /// FIXME(54883): Change this to just `P<Pat>`.
     Let(P<Pat>, P<Expr>),
     /// An `if` block, with an optional `else` block.
     ///
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index e64123c2382..421c327aa41 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -831,7 +831,7 @@ pub fn walk_param<'a, V: Visitor<'a>>(visitor: &mut V, param: &'a Param) {
 
 pub fn walk_arm<'a, V: Visitor<'a>>(visitor: &mut V, arm: &'a Arm) {
     visitor.visit_pat(&arm.pat);
-    // HACK(or_patterns; Centril | dlrobertson):
+    // NOTE(or_patterns; Centril | dlrobertson):
     // If you change this, also change the hack in `lowering.rs`.
     walk_list!(visitor, visit_expr, &arm.guard);
     visitor.visit_expr(&arm.body);