1
Fork 0

Rename hir::StmtKind::Local into hir::StmtKind::Let

This commit is contained in:
Guillaume Gomez 2024-03-14 11:53:38 +01:00
parent ca9f0630a9
commit a4e0e50a3f
58 changed files with 76 additions and 76 deletions

View file

@ -1209,7 +1209,7 @@ pub struct Stmt<'hir> {
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum StmtKind<'hir> {
/// A local (`let`) binding.
Local(&'hir Local<'hir>),
Let(&'hir Local<'hir>),
/// An item binding.
Item(ItemId),

View file

@ -627,7 +627,7 @@ pub fn walk_block<'v, V: Visitor<'v>>(visitor: &mut V, block: &'v Block<'v>) ->
pub fn walk_stmt<'v, V: Visitor<'v>>(visitor: &mut V, statement: &'v Stmt<'v>) -> V::Result {
try_visit!(visitor.visit_id(statement.hir_id));
match statement.kind {
StmtKind::Local(ref local) => visitor.visit_local(local),
StmtKind::Let(ref local) => visitor.visit_local(local),
StmtKind::Item(item) => visitor.visit_nested_item(item),
StmtKind::Expr(ref expression) | StmtKind::Semi(ref expression) => {
visitor.visit_expr(expression)