1 // Regression test for issue #91328.
7 fn foo(r: Result<Vec<i32>, i32>) -> i32 {
9 //~^ HELP: consider using `as_deref` here
11 //~^ ERROR: expected an array or slice
12 //~| NOTE: pattern cannot match with input type
17 fn bar(o: Option<Vec<i32>>) -> i32 {
19 //~^ HELP: consider using `as_deref` here
20 Some([a, b]) => a + b,
21 //~^ ERROR: expected an array or slice
22 //~| NOTE: pattern cannot match with input type
27 fn baz(v: Vec<i32>) -> i32 {
29 //~^ HELP: consider slicing here
31 //~^ ERROR: expected an array or slice
32 //~| NOTE: pattern cannot match with input type
37 fn qux(a: &Option<Box<[i32; 2]>>) -> i32 {
39 //~^ HELP: consider using `as_deref` here
40 Some([a, b]) => a + b,
41 //~^ ERROR: expected an array or slice
42 //~| NOTE: pattern cannot match with input type