Skip to content

Commit d038fb8

Browse files
committed
Preserve yield position during pretty printing
1 parent f9f0ac2 commit d038fb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
485485
| ast::ExprKind::Index(_, ref expr, _)
486486
| ast::ExprKind::Unary(_, ref expr)
487487
| ast::ExprKind::Try(ref expr)
488-
| ast::ExprKind::Yield(Some(ref expr)) => is_block_expr(context, expr, repr),
488+
| ast::ExprKind::Yield(Some(ref expr), _) => is_block_expr(context, expr, repr),
489489
ast::ExprKind::Closure(ref closure) => is_block_expr(context, &closure.body, repr),
490490
// This can only be a string lit
491491
ast::ExprKind::Lit(_) => {
@@ -515,7 +515,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
515515
| ast::ExprKind::Tup(..)
516516
| ast::ExprKind::Use(..)
517517
| ast::ExprKind::Type(..)
518-
| ast::ExprKind::Yield(None)
518+
| ast::ExprKind::Yield(None, _)
519519
| ast::ExprKind::Underscore => false,
520520
}
521521
}

0 commit comments

Comments
 (0)