mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Fix #2160
This commit is contained in:
parent
7d7fef1690
commit
5fca6eb89e
@ -132,6 +132,7 @@ fn is_unit_expr(expr: &Expr) -> Option<Span> {
|
||||
}
|
||||
|
||||
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];
|
||||
|
||||
|
||||
|
@ -71,3 +71,7 @@ pub fn foo() -> i32 {
|
||||
};
|
||||
55
|
||||
}
|
||||
|
||||
pub fn issue_2160() {
|
||||
let x = {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user