summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/issue-91328.fixed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/typeck/issue-91328.fixed
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/typeck/issue-91328.fixed')
-rw-r--r--src/test/ui/typeck/issue-91328.fixed47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/test/ui/typeck/issue-91328.fixed b/src/test/ui/typeck/issue-91328.fixed
deleted file mode 100644
index c0384399a..000000000
--- a/src/test/ui/typeck/issue-91328.fixed
+++ /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.as_deref() {
- //~^ 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.as_deref() {
- //~^ 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.as_deref() {
- //~^ 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() {}