From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/parser/lifetime_starts_expressions.rs | 39 ----------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/test/ui/parser/lifetime_starts_expressions.rs (limited to 'src/test/ui/parser/lifetime_starts_expressions.rs') diff --git a/src/test/ui/parser/lifetime_starts_expressions.rs b/src/test/ui/parser/lifetime_starts_expressions.rs deleted file mode 100644 index 903b4de6e..000000000 --- a/src/test/ui/parser/lifetime_starts_expressions.rs +++ /dev/null @@ -1,39 +0,0 @@ -#![allow(unused, dead_code)] - -fn foo() -> u32 { - return 'label: loop { break 'label 42; }; -} - -fn bar() -> u32 { - loop { break 'label: loop { break 'label 42; }; } - //~^ ERROR: parentheses are required around this expression to avoid confusion - //~| HELP: wrap the expression in parentheses -} - -fn baz() -> u32 { - 'label: loop { - break 'label - //~^ WARNING: this labeled break expression is easy to confuse with an unlabeled break - loop { break 42; }; - //~^ HELP: wrap this expression in parentheses - }; - - 'label2: loop { - break 'label2 'inner: loop { break 42; }; - // no warnings or errors here - } -} - -pub fn main() { - // Regression test for issue #86948, as resolved in #87026: - let a = 'first_loop: loop { - break 'first_loop 1; - }; - let b = loop { - break 'inner_loop: loop { - //~^ ERROR: parentheses are required around this expression to avoid confusion - //~| HELP: wrap the expression in parentheses - break 'inner_loop 1; - }; - }; -} -- cgit v1.2.3