We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b15c527 commit 1582d50Copy full SHA for 1582d50
src/expr.rs
@@ -1148,6 +1148,14 @@ fn stmt_is_if(stmt: &ast::Stmt) -> bool {
1148
}
1149
1150
1151
+fn block_last_stmt_is_if(block: &ast::Block) -> bool {
1152
+ if let Some(ref stmt) = block.stmts.last() {
1153
+ stmt_is_if(stmt)
1154
+ } else {
1155
+ false
1156
+ }
1157
+}
1158
+
1159
pub fn is_unsafe_block(block: &ast::Block) -> bool {
1160
if let ast::BlockCheckMode::Unsafe(..) = block.rules {
1161
true
0 commit comments