about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2024-03-18 09:27:47 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2024-03-18 09:27:47 +0000
commit8beec62315538da7449fe869fd366181f7923b6e (patch)
tree93abd2e3da2f870ddc6e3b28101c115297452c59 /compiler
parenta42873e85bcdcc83c3161309e0408f2147778523 (diff)
downloadrust-8beec62315538da7449fe869fd366181f7923b6e.tar.gz
rust-8beec62315538da7449fe869fd366181f7923b6e.zip
do not eat nested exprs result in format args visitor
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_ast_lowering/src/format.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/format.rs b/compiler/rustc_ast_lowering/src/format.rs
index 3f84e6b100d..d2c3b8b2d56 100644
--- a/compiler/rustc_ast_lowering/src/format.rs
+++ b/compiler/rustc_ast_lowering/src/format.rs
@@ -604,8 +604,7 @@ fn may_contain_yield_point(e: &ast::Expr) -> bool {
             if let ast::ExprKind::Await(_, _) | ast::ExprKind::Yield(_) = e.kind {
                 ControlFlow::Break(())
             } else {
-                visit::walk_expr(self, e);
-                ControlFlow::Continue(())
+                visit::walk_expr(self, e)
             }
         }