@@ -1209,7 +1209,7 @@ pub struct Stmt<'hir> {
12091209#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
12101210pub enum StmtKind < ' hir > {
12111211 /// A local (`let`) binding.
1212- Let ( & ' hir Local < ' hir > ) ,
1212+ Let ( & ' hir LetStmt < ' hir > ) ,
12131213
12141214 /// An item binding.
12151215 Item ( ItemId ) ,
@@ -1223,7 +1223,7 @@ pub enum StmtKind<'hir> {
12231223
12241224/// Represents a `let` statement (i.e., `let <pat>:<ty> = <init>;`).
12251225#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1226- pub struct Local < ' hir > {
1226+ pub struct LetStmt < ' hir > {
12271227 pub pat : & ' hir Pat < ' hir > ,
12281228 /// Type annotation, if any (otherwise the type will be inferred).
12291229 pub ty : Option < & ' hir Ty < ' hir > > ,
@@ -1253,7 +1253,7 @@ pub struct Arm<'hir> {
12531253 pub body : & ' hir Expr < ' hir > ,
12541254}
12551255
1256- /// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`Local `]), occurring in an `if-let`
1256+ /// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`LetStmt `]), occurring in an `if-let`
12571257/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
12581258///
12591259/// In an `if let`, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of
@@ -1850,7 +1850,7 @@ pub enum ExprKind<'hir> {
18501850 DropTemps ( & ' hir Expr < ' hir > ) ,
18511851 /// A `let $pat = $expr` expression.
18521852 ///
1853- /// These are not `Local` and only occur as expressions.
1853+ /// These are not [`LetStmt`] and only occur as expressions.
18541854 /// The `let Some(x) = foo()` in `if let Some(x) = foo()` is an example of `Let(..)`.
18551855 Let ( & ' hir LetExpr < ' hir > ) ,
18561856 /// An `if` block, with an optional else block.
@@ -3515,7 +3515,7 @@ pub enum Node<'hir> {
35153515 PatField ( & ' hir PatField < ' hir > ) ,
35163516 Arm ( & ' hir Arm < ' hir > ) ,
35173517 Block ( & ' hir Block < ' hir > ) ,
3518- Local ( & ' hir Local < ' hir > ) ,
3518+ Local ( & ' hir LetStmt < ' hir > ) ,
35193519 /// `Ctor` refers to the constructor of an enum variant or struct. Only tuple or unit variants
35203520 /// with synthesized constructors.
35213521 Ctor ( & ' hir VariantData < ' hir > ) ,
@@ -3743,7 +3743,7 @@ impl<'hir> Node<'hir> {
37433743 expect_pat_field, & ' hir PatField <' hir>, Node :: PatField ( n) , n;
37443744 expect_arm, & ' hir Arm <' hir>, Node :: Arm ( n) , n;
37453745 expect_block, & ' hir Block <' hir>, Node :: Block ( n) , n;
3746- expect_local, & ' hir Local <' hir>, Node :: Local ( n) , n;
3746+ expect_local, & ' hir LetStmt <' hir>, Node :: Local ( n) , n;
37473747 expect_ctor, & ' hir VariantData <' hir>, Node :: Ctor ( n) , n;
37483748 expect_lifetime, & ' hir Lifetime , Node :: Lifetime ( n) , n;
37493749 expect_generic_param, & ' hir GenericParam <' hir>, Node :: GenericParam ( n) , n;
@@ -3773,7 +3773,7 @@ mod size_asserts {
37733773 static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
37743774 static_assert_size ! ( Item <' _>, 88 ) ;
37753775 static_assert_size ! ( ItemKind <' _>, 56 ) ;
3776- static_assert_size ! ( Local <' _>, 64 ) ;
3776+ static_assert_size ! ( LetStmt <' _>, 64 ) ;
37773777 static_assert_size ! ( Param <' _>, 32 ) ;
37783778 static_assert_size ! ( Pat <' _>, 72 ) ;
37793779 static_assert_size ! ( Path <' _>, 40 ) ;
0 commit comments