From 9e72e35ceb2af024e8ca6a74442269f7ec739173 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Wed, 2 Nov 2022 21:22:24 -0700 Subject: Suggest `.clone()` or `ref binding` on E0382 --- compiler/rustc_parse/src/parser/expr.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index dc914f5ea64..9f2267efb82 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1734,7 +1734,7 @@ impl<'a> Parser<'a> { expr.kind, ExprKind::While(_, _, None) | ExprKind::ForLoop(_, _, _, None) - | ExprKind::Loop(_, None) + | ExprKind::Loop(_, None, _) | ExprKind::Block(_, None) ) { @@ -2444,10 +2444,11 @@ impl<'a> Parser<'a> { /// Parses `loop { ... }` (`loop` token already eaten). fn parse_loop_expr(&mut self, opt_label: Option