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 --- tests/ui/pattern/usefulness/refutable-pattern-errors.rs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/ui/pattern/usefulness/refutable-pattern-errors.rs (limited to 'tests/ui/pattern/usefulness/refutable-pattern-errors.rs') diff --git a/tests/ui/pattern/usefulness/refutable-pattern-errors.rs b/tests/ui/pattern/usefulness/refutable-pattern-errors.rs new file mode 100644 index 000000000..7a3e991d5 --- /dev/null +++ b/tests/ui/pattern/usefulness/refutable-pattern-errors.rs @@ -0,0 +1,9 @@ +fn func((1, (Some(1), 2..=3)): (isize, (Option, isize))) { } +//~^ ERROR refutable pattern in function argument +//~| `(_, _)` not covered + +fn main() { + let (1, (Some(1), 2..=3)) = (1, (None, 2)); + //~^ ERROR refutable pattern in local binding + //~| `(i32::MIN..=0_i32, _)` and `(2_i32..=i32::MAX, _)` not covered +} -- cgit v1.2.3