Commit b359ab0 1 parent 6623df0 commit b359ab0 Copy full SHA for b359ab0
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1043,7 +1043,6 @@ fn requires_terminator(expr: &Expr) -> bool {
1043
1043
| Expr :: Closure ( _)
1044
1044
| Expr :: Continue ( _)
1045
1045
| Expr :: Field ( _)
1046
- | Expr :: Group ( _)
1047
1046
| Expr :: Index ( _)
1048
1047
| Expr :: Infer ( _)
1049
1048
| Expr :: Let ( _)
@@ -1064,6 +1063,8 @@ fn requires_terminator(expr: &Expr) -> bool {
1064
1063
| Expr :: Verbatim ( _)
1065
1064
| Expr :: Yield ( _) => true ,
1066
1065
1066
+ Expr :: Group ( e) => requires_terminator ( & e. expr ) ,
1067
+
1067
1068
_ => true ,
1068
1069
}
1069
1070
}
@@ -1217,7 +1218,6 @@ fn is_blocklike(expr: &Expr) -> bool {
1217
1218
| Expr :: Continue ( _)
1218
1219
| Expr :: Field ( _)
1219
1220
| Expr :: ForLoop ( _)
1220
- | Expr :: Group ( _)
1221
1221
| Expr :: If ( _)
1222
1222
| Expr :: Index ( _)
1223
1223
| Expr :: Infer ( _)
@@ -1240,6 +1240,8 @@ fn is_blocklike(expr: &Expr) -> bool {
1240
1240
| Expr :: While ( _)
1241
1241
| Expr :: Yield ( _) => false ,
1242
1242
1243
+ Expr :: Group ( e) => is_blocklike ( & e. expr ) ,
1244
+
1243
1245
_ => false ,
1244
1246
}
1245
1247
}
You can’t perform that action at this time.
0 commit comments