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