Skip to content

Commit 55a4664

Browse files
committed
StmtKind
1 parent 6291ef7 commit 55a4664

23 files changed

+66
-66
lines changed

clippy_lints/src/attrs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ fn is_relevant_trait(tcx: TyCtxt, item: &TraitItem) -> bool {
234234
fn is_relevant_block(tcx: TyCtxt, tables: &ty::TypeckTables, block: &Block) -> bool {
235235
if let Some(stmt) = block.stmts.first() {
236236
match stmt.node {
237-
StmtDecl(_, _) => true,
238-
StmtExpr(ref expr, _) | StmtSemi(ref expr, _) => is_relevant_expr(tcx, tables, expr),
237+
StmtKind::Decl(_, _) => true,
238+
StmtKind::Expr(ref expr, _) | StmtKind::Semi(ref expr, _) => is_relevant_expr(tcx, tables, expr),
239239
}
240240
} else {
241241
block.expr.as_ref().map_or(false, |e| is_relevant_expr(tcx, tables, e))

clippy_lints/src/escape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
110110
if let Categorization::Rvalue(..) = cmt.cat {
111111
let id = map.hir_to_node_id(cmt.hir_id);
112112
if let Some(NodeStmt(st)) = map.find(map.get_parent_node(id)) {
113-
if let StmtDecl(ref decl, _) = st.node {
113+
if let StmtKind::Decl(ref decl, _) = st.node {
114114
if let DeclLocal(ref loc) = decl.node {
115115
if let Some(ref ex) = loc.init {
116116
if let ExprKind::Box(..) = ex.node {

clippy_lints/src/eval_order_dependence.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {
8282
}
8383
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt) {
8484
match stmt.node {
85-
StmtExpr(ref e, _) | StmtSemi(ref e, _) => DivergenceVisitor { cx }.maybe_walk_expr(e),
86-
StmtDecl(ref d, _) => if let DeclLocal(ref local) = d.node {
85+
StmtKind::Expr(ref e, _) | StmtKind::Semi(ref e, _) => DivergenceVisitor { cx }.maybe_walk_expr(e),
86+
StmtKind::Decl(ref d, _) => if let DeclLocal(ref local) = d.node {
8787
if let Local {
8888
init: Some(ref e), ..
8989
} = **local
@@ -262,8 +262,8 @@ fn check_expr<'a, 'tcx>(vis: &mut ReadVisitor<'a, 'tcx>, expr: &'tcx Expr) -> St
262262

263263
fn check_stmt<'a, 'tcx>(vis: &mut ReadVisitor<'a, 'tcx>, stmt: &'tcx Stmt) -> StopEarly {
264264
match stmt.node {
265-
StmtExpr(ref expr, _) | StmtSemi(ref expr, _) => check_expr(vis, expr),
266-
StmtDecl(ref decl, _) => {
265+
StmtKind::Expr(ref expr, _) | StmtKind::Semi(ref expr, _) => check_expr(vis, expr),
266+
StmtKind::Decl(ref decl, _) => {
267267
// If the declaration is of a local variable, check its initializer
268268
// expression if it has one. Otherwise, keep going.
269269
let local = match decl.node {

clippy_lints/src/let_if_seq.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetIfSeq {
6565
while let Some(stmt) = it.next() {
6666
if_chain! {
6767
if let Some(expr) = it.peek();
68-
if let hir::StmtDecl(ref decl, _) = stmt.node;
68+
if let hir::StmtKind::Decl(ref decl, _) = stmt.node;
6969
if let hir::DeclLocal(ref decl) = decl.node;
7070
if let hir::PatKind::Binding(mode, canonical_id, ident, None) = decl.pat.node;
71-
if let hir::StmtExpr(ref if_, _) = expr.node;
71+
if let hir::StmtKind::Expr(ref if_, _) = expr.node;
7272
if let hir::ExprKind::If(ref cond, ref then, ref else_) = if_.node;
7373
if !used_in_expr(cx, canonical_id, cond);
7474
if let hir::ExprKind::Block(ref then, _) = then.node;
@@ -163,7 +163,7 @@ fn check_assign<'a, 'tcx>(
163163
if_chain! {
164164
if block.expr.is_none();
165165
if let Some(expr) = block.stmts.iter().last();
166-
if let hir::StmtSemi(ref expr, _) = expr.node;
166+
if let hir::StmtKind::Semi(ref expr, _) = expr.node;
167167
if let hir::ExprKind::Assign(ref var, ref value) = expr.node;
168168
if let hir::ExprKind::Path(ref qpath) = var.node;
169169
if let Def::Local(local_id) = cx.tables.qpath_def(qpath, var.hir_id);

clippy_lints/src/loops.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
511511
}
512512

513513
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt) {
514-
if let StmtSemi(ref expr, _) = stmt.node {
514+
if let StmtKind::Semi(ref expr, _) = stmt.node {
515515
if let ExprKind::MethodCall(ref method, _, ref args) = expr.node {
516516
if args.len() == 1 && method.ident.name == "collect" && match_trait_method(cx, expr, &paths::ITERATOR) {
517517
span_lint(
@@ -584,8 +584,8 @@ fn never_loop_block(block: &Block, main_loop_id: NodeId) -> NeverLoopResult {
584584

585585
fn stmt_to_expr(stmt: &Stmt) -> Option<&Expr> {
586586
match stmt.node {
587-
StmtSemi(ref e, ..) | StmtExpr(ref e, ..) => Some(e),
588-
StmtDecl(ref d, ..) => decl_to_expr(d),
587+
StmtKind::Semi(ref e, ..) | StmtKind::Expr(ref e, ..) => Some(e),
588+
StmtKind::Decl(ref d, ..) => decl_to_expr(d),
589589
}
590590
}
591591

@@ -859,8 +859,8 @@ fn get_indexed_assignments<'a, 'tcx>(
859859
stmts
860860
.iter()
861861
.map(|stmt| match stmt.node {
862-
Stmt_::StmtDecl(..) => None,
863-
Stmt_::StmtExpr(ref e, _node_id) | Stmt_::StmtSemi(ref e, _node_id) => Some(get_assignment(cx, e, var)),
862+
StmtKind::Decl(..) => None,
863+
StmtKind::Expr(ref e, _node_id) | StmtKind::Semi(ref e, _node_id) => Some(get_assignment(cx, e, var)),
864864
})
865865
.chain(
866866
expr.as_ref()
@@ -1809,7 +1809,7 @@ fn extract_expr_from_first_stmt(block: &Block) -> Option<&Expr> {
18091809
if block.stmts.is_empty() {
18101810
return None;
18111811
}
1812-
if let StmtDecl(ref decl, _) = block.stmts[0].node {
1812+
if let StmtKind::Decl(ref decl, _) = block.stmts[0].node {
18131813
if let DeclLocal(ref local) = decl.node {
18141814
if let Some(ref expr) = local.init {
18151815
Some(expr)
@@ -1829,8 +1829,8 @@ fn extract_first_expr(block: &Block) -> Option<&Expr> {
18291829
match block.expr {
18301830
Some(ref expr) if block.stmts.is_empty() => Some(expr),
18311831
None if !block.stmts.is_empty() => match block.stmts[0].node {
1832-
StmtExpr(ref expr, _) | StmtSemi(ref expr, _) => Some(expr),
1833-
StmtDecl(..) => None,
1832+
StmtKind::Expr(ref expr, _) | StmtKind::Semi(ref expr, _) => Some(expr),
1833+
StmtKind::Decl(..) => None,
18341834
},
18351835
_ => None,
18361836
}

clippy_lints/src/map_unit_fn.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc::hir;
22
use rustc::lint::*;
33
use rustc::ty;
4-
use rustc_errors::{Applicability};
4+
use rustc_errors::Applicability;
55
use syntax::codemap::Span;
66
use crate::utils::{in_macro, iter_input_pats, match_type, method_chain_args, snippet, span_lint_and_then};
77
use crate::utils::paths;
@@ -131,9 +131,9 @@ fn reduce_unit_expression<'a>(cx: &LateContext, expr: &'a hir::Expr) -> Option<S
131131
// If block only contains statements,
132132
// reduce `{ X; }` to `X` or `X;`
133133
match inner_stmt.node {
134-
hir::StmtDecl(ref d, _) => Some(d.span),
135-
hir::StmtExpr(ref e, _) => Some(e.span),
136-
hir::StmtSemi(_, _) => Some(inner_stmt.span),
134+
hir::StmtKind::Decl(ref d, _) => Some(d.span),
135+
hir::StmtKind::Expr(ref e, _) => Some(e.span),
136+
hir::StmtKind::Semi(_, _) => Some(inner_stmt.span),
137137
}
138138
},
139139
_ => {
@@ -247,7 +247,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
247247
return;
248248
}
249249

250-
if let hir::StmtSemi(ref expr, _) = stmt.node {
250+
if let hir::StmtKind::Semi(ref expr, _) = stmt.node {
251251
if let hir::ExprKind::MethodCall(_, _, _) = expr.node {
252252
if let Some(arglists) = method_chain_args(expr, &["map"]) {
253253
lint_map_unit_fn(cx, stmt, expr, arglists[0]);

clippy_lints/src/methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ fn lint_clone_on_copy(cx: &LateContext, expr: &hir::Expr, arg: &hir::Expr, arg_t
11391139
_ => {},
11401140
}
11411141
hir::map::NodeStmt(stmt) => {
1142-
if let hir::StmtDecl(ref decl, _) = stmt.node {
1142+
if let hir::StmtKind::Decl(ref decl, _) = stmt.node {
11431143
if let hir::DeclLocal(ref loc) = decl.node {
11441144
if let hir::PatKind::Ref(..) = loc.pat.node {
11451145
// let ref y = *x borrows x, let ref y = x.clone() does not

clippy_lints/src/misc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
269269

270270
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, s: &'tcx Stmt) {
271271
if_chain! {
272-
if let StmtDecl(ref d, _) = s.node;
272+
if let StmtKind::Decl(ref d, _) = s.node;
273273
if let DeclLocal(ref l) = d.node;
274274
if let PatKind::Binding(an, _, i, None) = l.pat.node;
275275
if let Some(ref init) = l.init;
@@ -303,7 +303,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
303303
}
304304
};
305305
if_chain! {
306-
if let StmtSemi(ref expr, _) = s.node;
306+
if let StmtKind::Semi(ref expr, _) = s.node;
307307
if let ExprKind::Binary(ref binop, ref a, ref b) = expr.node;
308308
if binop.node == BinOpKind::And || binop.node == BinOpKind::Or;
309309
if let Some(sugg) = Sugg::hir_opt(cx, a);

clippy_lints/src/needless_bool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ enum Expression {
184184
fn fetch_bool_block(block: &Block) -> Expression {
185185
match (&*block.stmts, block.expr.as_ref()) {
186186
(&[], Some(e)) => fetch_bool_expr(&**e),
187-
(&[ref e], None) => if let StmtSemi(ref e, _) = e.node {
187+
(&[ref e], None) => if let StmtKind::Semi(ref e, _) = e.node {
188188
if let ExprKind::Ret(_) = e.node {
189189
fetch_bool_expr(&**e)
190190
} else {

clippy_lints/src/needless_pass_by_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl<'a, 'tcx> MovedVariablesCtxt<'a, 'tcx> {
350350
map::Node::NodeStmt(s) => {
351351
// `let <pat> = x;`
352352
if_chain! {
353-
if let StmtDecl(ref decl, _) = s.node;
353+
if let StmtKind::Decl(ref decl, _) = s.node;
354354
if let DeclLocal(ref local) = decl.node;
355355
then {
356356
self.spans_need_deref

clippy_lints/src/no_effect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl LintPass for Pass {
9797

9898
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
9999
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt) {
100-
if let StmtSemi(ref expr, _) = stmt.node {
100+
if let StmtKind::Semi(ref expr, _) = stmt.node {
101101
if has_no_effect(cx, expr) {
102102
span_lint(cx, NO_EFFECT, stmt.span, "statement with no effect");
103103
} else if let Some(reduced) = reduce_expression(cx, expr) {

clippy_lints/src/question_mark.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl QuestionMarkPass {
113113
if_chain! {
114114
if block.stmts.len() == 1;
115115
if let Some(expr) = block.stmts.iter().last();
116-
if let StmtSemi(ref expr, _) = expr.node;
116+
if let StmtKind::Semi(ref expr, _) = expr.node;
117117
if let ExprKind::Ret(ref ret_expr) = expr.node;
118118
if let &Some(ref ret_expr) = ret_expr;
119119

clippy_lints/src/shadow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ fn check_block<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, block: &'tcx Block, binding
110110
let len = bindings.len();
111111
for stmt in &block.stmts {
112112
match stmt.node {
113-
StmtDecl(ref decl, _) => check_decl(cx, decl, bindings),
114-
StmtExpr(ref e, _) | StmtSemi(ref e, _) => check_expr(cx, e, bindings),
113+
StmtKind::Decl(ref decl, _) => check_decl(cx, decl, bindings),
114+
StmtKind::Expr(ref e, _) | StmtKind::Semi(ref e, _) => check_expr(cx, e, bindings),
115115
}
116116
}
117117
if let Some(ref o) = block.expr {

clippy_lints/src/swap.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ fn check_manual_swap(cx: &LateContext, block: &Block) {
6161
for w in block.stmts.windows(3) {
6262
if_chain! {
6363
// let t = foo();
64-
if let StmtDecl(ref tmp, _) = w[0].node;
64+
if let StmtKind::Decl(ref tmp, _) = w[0].node;
6565
if let DeclLocal(ref tmp) = tmp.node;
6666
if let Some(ref tmp_init) = tmp.init;
6767
if let PatKind::Binding(_, _, ident, None) = tmp.pat.node;
6868

6969
// foo() = bar();
70-
if let StmtSemi(ref first, _) = w[1].node;
70+
if let StmtKind::Semi(ref first, _) = w[1].node;
7171
if let ExprKind::Assign(ref lhs1, ref rhs1) = first.node;
7272

7373
// bar() = t;
74-
if let StmtSemi(ref second, _) = w[2].node;
74+
if let StmtKind::Semi(ref second, _) = w[2].node;
7575
if let ExprKind::Assign(ref lhs2, ref rhs2) = second.node;
7676
if let ExprKind::Path(QPath::Resolved(None, ref rhs2)) = rhs2.node;
7777
if rhs2.segments.len() == 1;
@@ -145,8 +145,8 @@ fn check_manual_swap(cx: &LateContext, block: &Block) {
145145
fn check_suspicious_swap(cx: &LateContext, block: &Block) {
146146
for w in block.stmts.windows(2) {
147147
if_chain! {
148-
if let StmtSemi(ref first, _) = w[0].node;
149-
if let StmtSemi(ref second, _) = w[1].node;
148+
if let StmtKind::Semi(ref first, _) = w[0].node;
149+
if let StmtKind::Semi(ref second, _) = w[1].node;
150150
if !differing_macro_contexts(first.span, second.span);
151151
if let ExprKind::Assign(ref lhs0, ref rhs0) = first.node;
152152
if let ExprKind::Assign(ref lhs1, ref rhs1) = second.node;

clippy_lints/src/unused_io_amount.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl LintPass for UnusedIoAmount {
4040
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedIoAmount {
4141
fn check_stmt(&mut self, cx: &LateContext, s: &hir::Stmt) {
4242
let expr = match s.node {
43-
hir::StmtSemi(ref expr, _) | hir::StmtExpr(ref expr, _) => &**expr,
43+
hir::StmtKind::Semi(ref expr, _) | hir::StmtKind::Expr(ref expr, _) => &**expr,
4444
_ => return,
4545
};
4646

clippy_lints/src/utils/author.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,9 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
592592
let current = format!("{}.node", self.current);
593593
match s.node {
594594
// Could be an item or a local (let) binding:
595-
StmtDecl(ref decl, _) => {
595+
StmtKind::Decl(ref decl, _) => {
596596
let decl_pat = self.next("decl");
597-
println!("StmtDecl(ref {}, _) = {}", decl_pat, current);
597+
println!("StmtKind::Decl(ref {}, _) = {}", decl_pat, current);
598598
print!(" if let Decl_::");
599599
let current = format!("{}.node", decl_pat);
600600
match decl.node {
@@ -619,17 +619,17 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
619619
}
620620

621621
// Expr without trailing semi-colon (must have unit type):
622-
StmtExpr(ref e, _) => {
622+
StmtKind::Expr(ref e, _) => {
623623
let e_pat = self.next("e");
624-
println!("StmtExpr(ref {}, _) = {}", e_pat, current);
624+
println!("StmtKind::Expr(ref {}, _) = {}", e_pat, current);
625625
self.current = e_pat;
626626
self.visit_expr(e);
627627
},
628628

629629
// Expr with trailing semi-colon (may have any type):
630-
StmtSemi(ref e, _) => {
630+
StmtKind::Semi(ref e, _) => {
631631
let e_pat = self.next("e");
632-
println!("StmtSemi(ref {}, _) = {}", e_pat, current);
632+
println!("StmtKind::Semi(ref {}, _) = {}", e_pat, current);
633633
self.current = e_pat;
634634
self.visit_expr(e);
635635
},

clippy_lints/src/utils/higher.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ pub fn for_loop(expr: &hir::Expr) -> Option<(&hir::Pat, &hir::Expr, &hir::Expr)>
191191
if let hir::ExprKind::Loop(ref block, _, _) = arms[0].body.node;
192192
if block.expr.is_none();
193193
if let [ _, _, ref let_stmt, ref body ] = *block.stmts;
194-
if let hir::StmtDecl(ref decl, _) = let_stmt.node;
194+
if let hir::StmtKind::Decl(ref decl, _) = let_stmt.node;
195195
if let hir::DeclLocal(ref decl) = decl.node;
196-
if let hir::StmtExpr(ref expr, _) = body.node;
196+
if let hir::StmtKind::Expr(ref expr, _) = body.node;
197197
then {
198198
return Some((&*decl.pat, &iterargs[0], expr));
199199
}

clippy_lints/src/utils/hir_utils.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
4343
/// Check whether two statements are the same.
4444
pub fn eq_stmt(&mut self, left: &Stmt, right: &Stmt) -> bool {
4545
match (&left.node, &right.node) {
46-
(&StmtDecl(ref l, _), &StmtDecl(ref r, _)) => {
46+
(&StmtKind::Decl(ref l, _), &StmtKind::Decl(ref r, _)) => {
4747
if let (&DeclLocal(ref l), &DeclLocal(ref r)) = (&l.node, &r.node) {
4848
both(&l.ty, &r.ty, |l, r| self.eq_ty(l, r)) && both(&l.init, &r.init, |l, r| self.eq_expr(l, r))
4949
} else {
5050
false
5151
}
5252
},
53-
(&StmtExpr(ref l, _), &StmtExpr(ref r, _)) | (&StmtSemi(ref l, _), &StmtSemi(ref r, _)) => {
53+
(&StmtKind::Expr(ref l, _), &StmtKind::Expr(ref r, _)) | (&StmtKind::Semi(ref l, _), &StmtKind::Semi(ref r, _)) => {
5454
self.eq_expr(l, r)
5555
},
5656
_ => false,
@@ -597,8 +597,8 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
597597

598598
pub fn hash_stmt(&mut self, b: &Stmt) {
599599
match b.node {
600-
StmtDecl(ref decl, _) => {
601-
let c: fn(_, _) -> _ = StmtDecl;
600+
StmtKind::Decl(ref decl, _) => {
601+
let c: fn(_, _) -> _ = StmtKind::Decl;
602602
c.hash(&mut self.s);
603603

604604
if let DeclLocal(ref local) = decl.node {
@@ -607,13 +607,13 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
607607
}
608608
}
609609
},
610-
StmtExpr(ref expr, _) => {
611-
let c: fn(_, _) -> _ = StmtExpr;
610+
StmtKind::Expr(ref expr, _) => {
611+
let c: fn(_, _) -> _ = StmtKind::Expr;
612612
c.hash(&mut self.s);
613613
self.hash_expr(expr);
614614
},
615-
StmtSemi(ref expr, _) => {
616-
let c: fn(_, _) -> _ = StmtSemi;
615+
StmtKind::Semi(ref expr, _) => {
616+
let c: fn(_, _) -> _ = StmtKind::Semi;
617617
c.hash(&mut self.s);
618618
self.hash_expr(expr);
619619
},

clippy_lints/src/utils/inspector.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
122122
return;
123123
}
124124
match stmt.node {
125-
hir::StmtDecl(ref decl, _) => print_decl(cx, decl),
126-
hir::StmtExpr(ref e, _) | hir::StmtSemi(ref e, _) => print_expr(cx, e, 0),
125+
hir::StmtKind::Decl(ref decl, _) => print_decl(cx, decl),
126+
hir::StmtKind::Expr(ref e, _) | hir::StmtKind::Semi(ref e, _) => print_expr(cx, e, 0),
127127
}
128128
}
129129
// fn check_foreign_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx

tests/ui/author.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if_chain! {
2-
if let Stmt_::StmtDecl(ref decl, _) = stmt.node
2+
if let StmtKind::Decl(ref decl, _) = stmt.node
33
if let Decl_::DeclLocal(ref local) = decl.node;
44
if let Some(ref init) = local.init
55
if let ExprKind::Cast(ref expr, ref cast_ty) = init.node;

tests/ui/author/call.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if_chain! {
2-
if let Stmt_::StmtDecl(ref decl, _) = stmt.node
2+
if let StmtKind::Decl(ref decl, _) = stmt.node
33
if let Decl_::DeclLocal(ref local) = decl.node;
44
if let Some(ref init) = local.init
55
if let ExprKind::Call(ref func, ref args) = init.node;

0 commit comments

Comments
 (0)