From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/clippy/tests/ui/collapsible_match2.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tools/clippy/tests/ui/collapsible_match2.rs') diff --git a/src/tools/clippy/tests/ui/collapsible_match2.rs b/src/tools/clippy/tests/ui/collapsible_match2.rs index c8fb0a39e..56801f99e 100644 --- a/src/tools/clippy/tests/ui/collapsible_match2.rs +++ b/src/tools/clippy/tests/ui/collapsible_match2.rs @@ -11,6 +11,7 @@ fn lint_cases(opt_opt: Option>, res_opt: Result, String> { match res_opt { Ok(val) if make() => match val { + //~^ ERROR: this `match` can be collapsed into the outer `match` Some(n) => foo(n), _ => return, }, @@ -18,6 +19,7 @@ fn lint_cases(opt_opt: Option>, res_opt: Result, String> } match res_opt { Ok(val) => match val { + //~^ ERROR: this `match` can be collapsed into the outer `match` Some(n) => foo(n), _ => return, }, @@ -49,6 +51,7 @@ fn lint_cases(opt_opt: Option>, res_opt: Result, String> // deref reference value match Some(&[1]) { Some(s) => match *s { + //~^ ERROR: this `match` can be collapsed into the outer `match` [n] => foo(n), _ => (), }, @@ -58,6 +61,7 @@ fn lint_cases(opt_opt: Option>, res_opt: Result, String> // ref pattern and deref match Some(&[1]) { Some(ref s) => match s { + //~^ ERROR: this `match` can be collapsed into the outer `match` [n] => foo(n), _ => (), }, -- cgit v1.2.3