fix typos of author lint
This commit is contained in:
parent
0ea88b90d8
commit
2855a876a7
@ -733,7 +733,7 @@ macro_rules! kind {
|
|||||||
match stmt.value.kind {
|
match stmt.value.kind {
|
||||||
StmtKind::Let(local) => {
|
StmtKind::Let(local) => {
|
||||||
bind!(self, local);
|
bind!(self, local);
|
||||||
kind!("Local({local})");
|
kind!("Let({local})");
|
||||||
self.option(field!(local.init), "init", |init| {
|
self.option(field!(local.init), "init", |init| {
|
||||||
self.expr(init);
|
self.expr(init);
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& let Some(init) = local.init
|
||||||
&& let ExprKind::Cast(expr, cast_ty) = init.kind
|
&& let ExprKind::Cast(expr, cast_ty) = init.kind
|
||||||
&& let TyKind::Path(ref qpath) = cast_ty.kind
|
&& let TyKind::Path(ref qpath) = cast_ty.kind
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
if let ExprKind::Block(block, None) = expr.kind
|
if let ExprKind::Block(block, None) = expr.kind
|
||||||
&& block.stmts.len() == 3
|
&& 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 Some(init) = local.init
|
||||||
&& let ExprKind::Lit(ref lit) = init.kind
|
&& let ExprKind::Lit(ref lit) = init.kind
|
||||||
&& let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node
|
&& let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node
|
||||||
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
|
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
|
||||||
&& name.as_str() == "x"
|
&& 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 Some(init1) = local1.init
|
||||||
&& let ExprKind::Lit(ref lit1) = init1.kind
|
&& let ExprKind::Lit(ref lit1) = init1.kind
|
||||||
&& let LitKind::Float(_, LitFloatType::Suffixed(FloatTy::F32)) = lit1.node
|
&& 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
|
if let ExprKind::Block(block, None) = expr.kind
|
||||||
&& block.stmts.len() == 1
|
&& 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 Some(init) = local.init
|
||||||
&& let ExprKind::Call(func, args) = init.kind
|
&& let ExprKind::Call(func, args) = init.kind
|
||||||
&& let ExprKind::Path(ref qpath) = func.kind
|
&& let ExprKind::Path(ref qpath) = func.kind
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& let Some(init) = local.init
|
||||||
&& let ExprKind::Call(func, args) = init.kind
|
&& let ExprKind::Call(func, args) = init.kind
|
||||||
&& let ExprKind::Path(ref qpath) = func.kind
|
&& let ExprKind::Path(ref qpath) = func.kind
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& let Some(init) = local.init
|
||||||
&& let ExprKind::If(cond, then, Some(else_expr)) = init.kind
|
&& let ExprKind::If(cond, then, Some(else_expr)) = init.kind
|
||||||
&& let ExprKind::DropTemps(expr) = cond.kind
|
&& let ExprKind::DropTemps(expr) = cond.kind
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& let Some(init) = local.init
|
||||||
&& let ExprKind::Call(func, args) = init.kind
|
&& let ExprKind::Call(func, args) = init.kind
|
||||||
&& let ExprKind::Path(ref qpath) = func.kind
|
&& let ExprKind::Path(ref qpath) = func.kind
|
||||||
|
@ -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 LitKind::Int(10, LitIntType::Unsuffixed) = lit1.node
|
||||||
&& let ExprKind::Block(block, None) = body.kind
|
&& let ExprKind::Block(block, None) = body.kind
|
||||||
&& block.stmts.len() == 1
|
&& 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 Some(init) = local.init
|
||||||
&& let ExprKind::Path(ref qpath1) = init.kind
|
&& let ExprKind::Path(ref qpath1) = init.kind
|
||||||
&& match_qpath(qpath1, &["y"])
|
&& match_qpath(qpath1, &["y"])
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& 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 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
|
&& let FnRetTy::DefaultReturn(_) = fn_decl.output
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if let StmtKind::Local(local) = stmt.kind
|
if let StmtKind::Let(local) = stmt.kind
|
||||||
&& let Some(init) = local.init
|
&& let Some(init) = local.init
|
||||||
&& let ExprKind::Match(scrutinee, arms, MatchSource::Normal) = init.kind
|
&& let ExprKind::Match(scrutinee, arms, MatchSource::Normal) = init.kind
|
||||||
&& let ExprKind::Lit(ref lit) = scrutinee.kind
|
&& let ExprKind::Lit(ref lit) = scrutinee.kind
|
||||||
@ -16,7 +16,7 @@ if let StmtKind::Local(local) = stmt.kind
|
|||||||
&& arms[1].guard.is_none()
|
&& arms[1].guard.is_none()
|
||||||
&& let ExprKind::Block(block, None) = arms[1].body.kind
|
&& let ExprKind::Block(block, None) = arms[1].body.kind
|
||||||
&& block.stmts.len() == 1
|
&& 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 Some(init1) = local1.init
|
||||||
&& let ExprKind::Lit(ref lit4) = init1.kind
|
&& let ExprKind::Lit(ref lit4) = init1.kind
|
||||||
&& let LitKind::Int(3, LitIntType::Unsuffixed) = lit4.node
|
&& let LitKind::Int(3, LitIntType::Unsuffixed) = lit4.node
|
||||||
|
Loading…
Reference in New Issue
Block a user