mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 08:57:30 +00:00
87fa2d90f5
Lint redundant_semicolon was added to rustc
16 lines
391 B
Text
16 lines
391 B
Text
if_chain! {
|
|
if let ExprKind::Block(ref block) = expr.node;
|
|
if let Some(trailing_expr) = &block.expr;
|
|
if block.stmts.len() == 1;
|
|
if let StmtKind::Semi(ref e, _) = block.stmts[0].node
|
|
if let ExprKind::Tup(ref elements) = e.node;
|
|
if elements.len() == 0;
|
|
then {
|
|
// report your lint here
|
|
}
|
|
}
|
|
if_chain! {
|
|
then {
|
|
// report your lint here
|
|
}
|
|
}
|