@@ -1220,7 +1220,7 @@ pub struct Stmt<'hir> {
12201220#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
12211221pub enum StmtKind < ' hir > {
12221222 /// A local (`let`) binding.
1223- Let ( & ' hir Local < ' hir > ) ,
1223+ Let ( & ' hir LetStmt < ' hir > ) ,
12241224
12251225 /// An item binding.
12261226 Item ( ItemId ) ,
@@ -1234,7 +1234,7 @@ pub enum StmtKind<'hir> {
12341234
12351235/// Represents a `let` statement (i.e., `let <pat>:<ty> = <init>;`).
12361236#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
1237- pub struct Local < ' hir > {
1237+ pub struct LetStmt < ' hir > {
12381238 pub pat : & ' hir Pat < ' hir > ,
12391239 /// Type annotation, if any (otherwise the type will be inferred).
12401240 pub ty : Option < & ' hir Ty < ' hir > > ,
@@ -1264,7 +1264,7 @@ pub struct Arm<'hir> {
12641264 pub body : & ' hir Expr < ' hir > ,
12651265}
12661266
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`
12681268/// or `let-else`, evaluating to a boolean. Typically the pattern is refutable.
12691269///
12701270/// 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> {
18611861 DropTemps ( & ' hir Expr < ' hir > ) ,
18621862 /// A `let $pat = $expr` expression.
18631863 ///
1864- /// These are not `Local` and only occur as expressions.
1864+ /// These are not [`LetStmt`] and only occur as expressions.
18651865 /// The `let Some(x) = foo()` in `if let Some(x) = foo()` is an example of `Let(..)`.
18661866 Let ( & ' hir LetExpr < ' hir > ) ,
18671867 /// An `if` block, with an optional else block.
@@ -3529,7 +3529,7 @@ pub enum Node<'hir> {
35293529 PatField ( & ' hir PatField < ' hir > ) ,
35303530 Arm ( & ' hir Arm < ' hir > ) ,
35313531 Block ( & ' hir Block < ' hir > ) ,
3532- Local ( & ' hir Local < ' hir > ) ,
3532+ LetStmt ( & ' hir LetStmt < ' hir > ) ,
35333533 /// `Ctor` refers to the constructor of an enum variant or struct. Only tuple or unit variants
35343534 /// with synthesized constructors.
35353535 Ctor ( & ' hir VariantData < ' hir > ) ,
@@ -3585,7 +3585,7 @@ impl<'hir> Node<'hir> {
35853585 | Node :: Ctor ( ..)
35863586 | Node :: Pat ( ..)
35873587 | Node :: Arm ( ..)
3588- | Node :: Local ( ..)
3588+ | Node :: LetStmt ( ..)
35893589 | Node :: Crate ( ..)
35903590 | Node :: Ty ( ..)
35913591 | Node :: TraitRef ( ..)
@@ -3757,7 +3757,7 @@ impl<'hir> Node<'hir> {
37573757 expect_pat_field, & ' hir PatField <' hir>, Node :: PatField ( n) , n;
37583758 expect_arm, & ' hir Arm <' hir>, Node :: Arm ( n) , n;
37593759 expect_block, & ' hir Block <' hir>, Node :: Block ( n) , n;
3760- expect_local , & ' hir Local <' hir>, Node :: Local ( n) , n;
3760+ expect_let_stmt , & ' hir LetStmt <' hir>, Node :: LetStmt ( n) , n;
37613761 expect_ctor, & ' hir VariantData <' hir>, Node :: Ctor ( n) , n;
37623762 expect_lifetime, & ' hir Lifetime , Node :: Lifetime ( n) , n;
37633763 expect_generic_param, & ' hir GenericParam <' hir>, Node :: GenericParam ( n) , n;
@@ -3787,7 +3787,7 @@ mod size_asserts {
37873787 static_assert_size ! ( ImplItemKind <' _>, 40 ) ;
37883788 static_assert_size ! ( Item <' _>, 88 ) ;
37893789 static_assert_size ! ( ItemKind <' _>, 56 ) ;
3790- static_assert_size ! ( Local <' _>, 64 ) ;
3790+ static_assert_size ! ( LetStmt <' _>, 64 ) ;
37913791 static_assert_size ! ( Param <' _>, 32 ) ;
37923792 static_assert_size ! ( Pat <' _>, 72 ) ;
37933793 static_assert_size ! ( Path <' _>, 40 ) ;
0 commit comments