@@ -1221,7 +1221,7 @@ pub struct Stmt<'hir> {
12211221#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
12221222pub enum StmtKind < ' hir > {
12231223 /// A local (`let`) binding.
1224- Let ( & ' hir Local < ' hir > ) ,
1224+ Let ( & ' hir LetStmt < ' hir > ) ,
12251225
12261226 /// An item binding.
12271227 Item ( ItemId ) ,
@@ -1235,7 +1235,7 @@ pub enum StmtKind<'hir> {
12351235
12361236/// Represents a `let` statement (i.e., `let <pat>:<ty> = <init>;`).
12371237#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1238- pub struct Local < ' hir > {
1238+ pub struct LetStmt < ' hir > {
12391239 pub pat : & ' hir Pat < ' hir > ,
12401240 /// Type annotation, if any (otherwise the type will be inferred).
12411241 pub ty : Option < & ' hir Ty < ' hir > > ,
@@ -1265,7 +1265,7 @@ pub struct Arm<'hir> {
12651265 pub body : & ' hir Expr < ' hir > ,
12661266}
12671267
1268- /// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`Local `]), occurring in an `if-let`
1268+ /// Represents a `let <pat>[: <ty>] = <expr>` expression (not a [`LetStmt `]), occurring in an `if-let`
12691269/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
12701270///
12711271/// In an `if let`, imagine it as `if (let <pat> = <expr>) { ... }`; in a let-else, it is part of
@@ -1862,7 +1862,7 @@ pub enum ExprKind<'hir> {
18621862 DropTemps ( & ' hir Expr < ' hir > ) ,
18631863 /// A `let $pat = $expr` expression.
18641864 ///
1865- /// These are not `Local` and only occur as expressions.
1865+ /// These are not [`LetStmt`] and only occur as expressions.
18661866 /// The `let Some(x) = foo()` in `if let Some(x) = foo()` is an example of `Let(..)`.
18671867 Let ( & ' hir LetExpr < ' hir > ) ,
18681868 /// An `if` block, with an optional else block.
@@ -3527,7 +3527,7 @@ pub enum Node<'hir> {
35273527 PatField ( & ' hir PatField < ' hir > ) ,
35283528 Arm ( & ' hir Arm < ' hir > ) ,
35293529 Block ( & ' hir Block < ' hir > ) ,
3530- Local ( & ' hir Local < ' hir > ) ,
3530+ Local ( & ' hir LetStmt < ' hir > ) ,
35313531 /// `Ctor` refers to the constructor of an enum variant or struct. Only tuple or unit variants
35323532 /// with synthesized constructors.
35333533 Ctor ( & ' hir VariantData < ' hir > ) ,
@@ -3755,7 +3755,7 @@ impl<'hir> Node<'hir> {
37553755 expect_pat_field, & ' hir PatField <' hir>, Node :: PatField ( n) , n;
37563756 expect_arm, & ' hir Arm <' hir>, Node :: Arm ( n) , n;
37573757 expect_block, & ' hir Block <' hir>, Node :: Block ( n) , n;
3758- expect_local, & ' hir Local <' hir>, Node :: Local ( n) , n;
3758+ expect_local, & ' hir LetStmt <' hir>, Node :: Local ( n) , n;
37593759 expect_ctor, & ' hir VariantData <' hir>, Node :: Ctor ( n) , n;
37603760 expect_lifetime, & ' hir Lifetime , Node :: Lifetime ( n) , n;
37613761 expect_generic_param, & ' hir GenericParam <' hir>, Node :: GenericParam ( n) , n;
@@ -3785,7 +3785,7 @@ mod size_asserts {
37853785 static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
37863786 static_assert_size ! ( Item <' _>, 88 ) ;
37873787 static_assert_size ! ( ItemKind <' _>, 56 ) ;
3788- static_assert_size ! ( Local <' _>, 64 ) ;
3788+ static_assert_size ! ( LetStmt <' _>, 64 ) ;
37893789 static_assert_size ! ( Param <' _>, 32 ) ;
37903790 static_assert_size ! ( Pat <' _>, 72 ) ;
37913791 static_assert_size ! ( Path <' _>, 40 ) ;
0 commit comments