Skip to content

Commit ca968a1

Browse files
committed
or-patterns: syntax: simplify Arm.pats and ExprKind::Let.0.
1 parent dbe6873 commit ca968a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/ast.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ pub struct Local {
930930
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
931931
pub struct Arm {
932932
pub attrs: Vec<Attribute>,
933-
pub pats: Vec<P<Pat>>,
933+
pub pat: P<Pat>,
934934
pub guard: Option<P<Expr>>,
935935
pub body: P<Expr>,
936936
pub span: Span,
@@ -1148,12 +1148,12 @@ pub enum ExprKind {
11481148
Cast(P<Expr>, P<Ty>),
11491149
/// A type ascription (e.g., `42: usize`).
11501150
Type(P<Expr>, P<Ty>),
1151-
/// A `let pats = expr` expression that is only semantically allowed in the condition
1151+
/// A `let pat = expr` expression that is only semantically allowed in the condition
11521152
/// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`).
11531153
///
11541154
/// The `Vec<P<Pat>>` is for or-patterns at the top level.
11551155
/// FIXME(54883): Change this to just `P<Pat>`.
1156-
Let(Vec<P<Pat>>, P<Expr>),
1156+
Let(P<Pat>, P<Expr>),
11571157
/// An `if` block, with an optional `else` block.
11581158
///
11591159
/// `if expr { block } else { expr }`

0 commit comments

Comments
 (0)