@@ -1221,7 +1221,7 @@ pub struct Stmt<'hir> {
1221
1221
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1222
1222
pub enum StmtKind < ' hir > {
1223
1223
/// A local (`let`) binding.
1224
- Let ( & ' hir Local < ' hir > ) ,
1224
+ Let ( & ' hir LetStmt < ' hir > ) ,
1225
1225
1226
1226
/// An item binding.
1227
1227
Item ( ItemId ) ,
@@ -1235,7 +1235,7 @@ pub enum StmtKind<'hir> {
1235
1235
1236
1236
/// Represents a `let` statement (i.e., `let <pat>:<ty> = <init>;`).
1237
1237
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1238
- pub struct Local < ' hir > {
1238
+ pub struct LetStmt < ' hir > {
1239
1239
pub pat : & ' hir Pat < ' hir > ,
1240
1240
/// Type annotation, if any (otherwise the type will be inferred).
1241
1241
pub ty : Option < & ' hir Ty < ' hir > > ,
@@ -1265,7 +1265,7 @@ pub struct Arm<'hir> {
1265
1265
pub body : & ' hir Expr < ' hir > ,
1266
1266
}
1267
1267
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`
1269
1269
/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
1270
1270
///
1271
1271
/// 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> {
1862
1862
DropTemps ( & ' hir Expr < ' hir > ) ,
1863
1863
/// A `let $pat = $expr` expression.
1864
1864
///
1865
- /// These are not `Local` and only occur as expressions.
1865
+ /// These are not [`LetStmt`] and only occur as expressions.
1866
1866
/// The `let Some(x) = foo()` in `if let Some(x) = foo()` is an example of `Let(..)`.
1867
1867
Let ( & ' hir LetExpr < ' hir > ) ,
1868
1868
/// An `if` block, with an optional else block.
@@ -3527,7 +3527,7 @@ pub enum Node<'hir> {
3527
3527
PatField ( & ' hir PatField < ' hir > ) ,
3528
3528
Arm ( & ' hir Arm < ' hir > ) ,
3529
3529
Block ( & ' hir Block < ' hir > ) ,
3530
- Local ( & ' hir Local < ' hir > ) ,
3530
+ Local ( & ' hir LetStmt < ' hir > ) ,
3531
3531
/// `Ctor` refers to the constructor of an enum variant or struct. Only tuple or unit variants
3532
3532
/// with synthesized constructors.
3533
3533
Ctor ( & ' hir VariantData < ' hir > ) ,
@@ -3755,7 +3755,7 @@ impl<'hir> Node<'hir> {
3755
3755
expect_pat_field, & ' hir PatField <' hir>, Node :: PatField ( n) , n;
3756
3756
expect_arm, & ' hir Arm <' hir>, Node :: Arm ( n) , n;
3757
3757
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;
3759
3759
expect_ctor, & ' hir VariantData <' hir>, Node :: Ctor ( n) , n;
3760
3760
expect_lifetime, & ' hir Lifetime , Node :: Lifetime ( n) , n;
3761
3761
expect_generic_param, & ' hir GenericParam <' hir>, Node :: GenericParam ( n) , n;
@@ -3785,7 +3785,7 @@ mod size_asserts {
3785
3785
static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
3786
3786
static_assert_size ! ( Item <' _>, 88 ) ;
3787
3787
static_assert_size ! ( ItemKind <' _>, 56 ) ;
3788
- static_assert_size ! ( Local <' _>, 64 ) ;
3788
+ static_assert_size ! ( LetStmt <' _>, 64 ) ;
3789
3789
static_assert_size ! ( Param <' _>, 32 ) ;
3790
3790
static_assert_size ! ( Pat <' _>, 72 ) ;
3791
3791
static_assert_size ! ( Path <' _>, 40 ) ;
0 commit comments