@@ -1209,7 +1209,7 @@ pub struct Stmt<'hir> {
1209
1209
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1210
1210
pub enum StmtKind < ' hir > {
1211
1211
/// A local (`let`) binding.
1212
- Let ( & ' hir Local < ' hir > ) ,
1212
+ Let ( & ' hir LetStmt < ' hir > ) ,
1213
1213
1214
1214
/// An item binding.
1215
1215
Item ( ItemId ) ,
@@ -1223,7 +1223,7 @@ pub enum StmtKind<'hir> {
1223
1223
1224
1224
/// Represents a `let` statement (i.e., `let <pat>:<ty> = <init>;`).
1225
1225
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1226
- pub struct Local < ' hir > {
1226
+ pub struct LetStmt < ' hir > {
1227
1227
pub pat : & ' hir Pat < ' hir > ,
1228
1228
/// Type annotation, if any (otherwise the type will be inferred).
1229
1229
pub ty : Option < & ' hir Ty < ' hir > > ,
@@ -1253,7 +1253,7 @@ pub struct Arm<'hir> {
1253
1253
pub body : & ' hir Expr < ' hir > ,
1254
1254
}
1255
1255
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`
1257
1257
/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
1258
1258
///
1259
1259
/// 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> {
1850
1850
DropTemps ( & ' hir Expr < ' hir > ) ,
1851
1851
/// A `let $pat = $expr` expression.
1852
1852
///
1853
- /// These are not `Local` and only occur as expressions.
1853
+ /// These are not [`LetStmt`] and only occur as expressions.
1854
1854
/// The `let Some(x) = foo()` in `if let Some(x) = foo()` is an example of `Let(..)`.
1855
1855
Let ( & ' hir LetExpr < ' hir > ) ,
1856
1856
/// An `if` block, with an optional else block.
@@ -3515,7 +3515,7 @@ pub enum Node<'hir> {
3515
3515
PatField ( & ' hir PatField < ' hir > ) ,
3516
3516
Arm ( & ' hir Arm < ' hir > ) ,
3517
3517
Block ( & ' hir Block < ' hir > ) ,
3518
- Local ( & ' hir Local < ' hir > ) ,
3518
+ Local ( & ' hir LetStmt < ' hir > ) ,
3519
3519
/// `Ctor` refers to the constructor of an enum variant or struct. Only tuple or unit variants
3520
3520
/// with synthesized constructors.
3521
3521
Ctor ( & ' hir VariantData < ' hir > ) ,
@@ -3743,7 +3743,7 @@ impl<'hir> Node<'hir> {
3743
3743
expect_pat_field, & ' hir PatField <' hir>, Node :: PatField ( n) , n;
3744
3744
expect_arm, & ' hir Arm <' hir>, Node :: Arm ( n) , n;
3745
3745
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;
3747
3747
expect_ctor, & ' hir VariantData <' hir>, Node :: Ctor ( n) , n;
3748
3748
expect_lifetime, & ' hir Lifetime , Node :: Lifetime ( n) , n;
3749
3749
expect_generic_param, & ' hir GenericParam <' hir>, Node :: GenericParam ( n) , n;
@@ -3773,7 +3773,7 @@ mod size_asserts {
3773
3773
static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
3774
3774
static_assert_size ! ( Item <' _>, 88 ) ;
3775
3775
static_assert_size ! ( ItemKind <' _>, 56 ) ;
3776
- static_assert_size ! ( Local <' _>, 64 ) ;
3776
+ static_assert_size ! ( LetStmt <' _>, 64 ) ;
3777
3777
static_assert_size ! ( Param <' _>, 32 ) ;
3778
3778
static_assert_size ! ( Pat <' _>, 72 ) ;
3779
3779
static_assert_size ! ( Path <' _>, 40 ) ;
0 commit comments