Fix for-loop expressions breaking with BlockExpr iterable
This commit is contained in:
@@ -754,6 +754,15 @@ impl ast::GenericParamList {
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::HasLoopBody for ast::ForExpr {
|
||||
fn loop_body(&self) -> Option<ast::BlockExpr> {
|
||||
let mut exprs = support::children(self.syntax());
|
||||
let first = exprs.next();
|
||||
let second = exprs.next();
|
||||
second.or(first)
|
||||
}
|
||||
}
|
||||
|
||||
impl ast::HasDocComments for ast::SourceFile {}
|
||||
impl ast::HasDocComments for ast::Fn {}
|
||||
impl ast::HasDocComments for ast::Struct {}
|
||||
|
||||
Reference in New Issue
Block a user