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 c274c61 commit b15c527Copy full SHA for b15c527
src/expr.rs
@@ -1136,6 +1136,18 @@ pub fn stmt_is_expr(stmt: &ast::Stmt) -> bool {
1136
}
1137
1138
1139
+fn stmt_is_if(stmt: &ast::Stmt) -> bool {
1140
+ match stmt.node {
1141
+ ast::StmtKind::Semi(ref e) | ast::StmtKind::Expr(ref e) => {
1142
+ match e.node {
1143
+ ast::ExprKind::If(..) => true,
1144
+ _ => false,
1145
+ }
1146
+ },
1147
1148
1149
+}
1150
+
1151
pub fn is_unsafe_block(block: &ast::Block) -> bool {
1152
if let ast::BlockCheckMode::Unsafe(..) = block.rules {
1153
true
0 commit comments