diff options
Diffstat (limited to 'src/test/ui/typeck/issue-91328.rs')
-rw-r--r-- | src/test/ui/typeck/issue-91328.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/test/ui/typeck/issue-91328.rs b/src/test/ui/typeck/issue-91328.rs deleted file mode 100644 index 63602d26f..000000000 --- a/src/test/ui/typeck/issue-91328.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Regression test for issue #91328. - -// run-rustfix - -#![allow(dead_code)] - -fn foo(r: Result<Vec<i32>, i32>) -> i32 { - match r { - //~^ HELP: consider using `as_deref` here - Ok([a, b]) => a + b, - //~^ ERROR: expected an array or slice - //~| NOTE: pattern cannot match with input type - _ => 42, - } -} - -fn bar(o: Option<Vec<i32>>) -> i32 { - match o { - //~^ HELP: consider using `as_deref` here - Some([a, b]) => a + b, - //~^ ERROR: expected an array or slice - //~| NOTE: pattern cannot match with input type - _ => 42, - } -} - -fn baz(v: Vec<i32>) -> i32 { - match v { - //~^ HELP: consider slicing here - [a, b] => a + b, - //~^ ERROR: expected an array or slice - //~| NOTE: pattern cannot match with input type - _ => 42, - } -} - -fn qux(a: &Option<Box<[i32; 2]>>) -> i32 { - match a { - //~^ HELP: consider using `as_deref` here - Some([a, b]) => a + b, - //~^ ERROR: expected an array or slice - //~| NOTE: pattern cannot match with input type - _ => 42, - } -} - -fn main() {} |