mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
Fix #2160
This commit is contained in:
@@ -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 = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user