fix typos of author lint

This commit is contained in:
Lzu Tao 2024-05-26 10:50:30 +07:00
parent 0ea88b90d8
commit 2855a876a7
9 changed files with 12 additions and 12 deletions

View File

@ -733,7 +733,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
match stmt.value.kind {
StmtKind::Let(local) => {
bind!(self, local);
kind!("Local({local})");
kind!("Let({local})");
self.option(field!(local.init), "init", |init| {
self.expr(init);
});

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Cast(expr, cast_ty) = init.kind
&& let TyKind::Path(ref qpath) = cast_ty.kind

View File

@ -1,12 +1,12 @@
if let ExprKind::Block(block, None) = expr.kind
&& block.stmts.len() == 3
&& let StmtKind::Local(local) = block.stmts[0].kind
&& let StmtKind::Let(local) = block.stmts[0].kind
&& let Some(init) = local.init
&& let ExprKind::Lit(ref lit) = init.kind
&& let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
&& name.as_str() == "x"
&& let StmtKind::Local(local1) = block.stmts[1].kind
&& let StmtKind::Let(local1) = block.stmts[1].kind
&& let Some(init1) = local1.init
&& let ExprKind::Lit(ref lit1) = init1.kind
&& let LitKind::Float(_, LitFloatType::Suffixed(FloatTy::F32)) = lit1.node
@ -22,7 +22,7 @@ if let ExprKind::Block(block, None) = expr.kind
}
if let ExprKind::Block(block, None) = expr.kind
&& block.stmts.len() == 1
&& let StmtKind::Local(local) = block.stmts[0].kind
&& let StmtKind::Let(local) = block.stmts[0].kind
&& let Some(init) = local.init
&& let ExprKind::Call(func, args) = init.kind
&& let ExprKind::Path(ref qpath) = func.kind

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Call(func, args) = init.kind
&& let ExprKind::Path(ref qpath) = func.kind

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::If(cond, then, Some(else_expr)) = init.kind
&& let ExprKind::DropTemps(expr) = cond.kind

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Call(func, args) = init.kind
&& let ExprKind::Path(ref qpath) = func.kind

View File

@ -12,7 +12,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
&& let LitKind::Int(10, LitIntType::Unsuffixed) = lit1.node
&& let ExprKind::Block(block, None) = body.kind
&& block.stmts.len() == 1
&& let StmtKind::Local(local) = block.stmts[0].kind
&& let StmtKind::Let(local) = block.stmts[0].kind
&& let Some(init) = local.init
&& let ExprKind::Path(ref qpath1) = init.kind
&& match_qpath(qpath1, &["y"])

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Closure { capture_clause: CaptureBy::Ref, fn_decl: fn_decl, body: body_id, closure_kind: ClosureKind::Closure, .. } = init.kind
&& let FnRetTy::DefaultReturn(_) = fn_decl.output

View File

@ -1,4 +1,4 @@
if let StmtKind::Local(local) = stmt.kind
if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Match(scrutinee, arms, MatchSource::Normal) = init.kind
&& let ExprKind::Lit(ref lit) = scrutinee.kind
@ -16,7 +16,7 @@ if let StmtKind::Local(local) = stmt.kind
&& arms[1].guard.is_none()
&& let ExprKind::Block(block, None) = arms[1].body.kind
&& block.stmts.len() == 1
&& let StmtKind::Local(local1) = block.stmts[0].kind
&& let StmtKind::Let(local1) = block.stmts[0].kind
&& let Some(init1) = local1.init
&& let ExprKind::Lit(ref lit4) = init1.kind
&& let LitKind::Int(3, LitIntType::Unsuffixed) = lit4.node