mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Fix #2160
This commit is contained in:
parent
7d7fef1690
commit
5fca6eb89e
2 changed files with 5 additions and 0 deletions
|
@ -132,6 +132,7 @@ fn is_unit_expr(expr: &Expr) -> Option<Span> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_last_stmt_in_block(block: &Block) -> bool {
|
fn check_last_stmt_in_block(block: &Block) -> bool {
|
||||||
|
if block.stmts.is_empty() { return false; }
|
||||||
let final_stmt = &block.stmts[block.stmts.len() - 1];
|
let final_stmt = &block.stmts[block.stmts.len() - 1];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,3 +71,7 @@ pub fn foo() -> i32 {
|
||||||
};
|
};
|
||||||
55
|
55
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn issue_2160() {
|
||||||
|
let x = {};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue