about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-15 10:57:00 +0100
committerGitHub <noreply@github.com>2021-12-15 10:57:00 +0100
commitb507174e82bf6d54e235c4fe71e8fe216f80ce9f (patch)
tree7dafe4e761fbe53da6a6bf698a9a7ecf6330dd67 /src/test/ui/pattern
parent700670f3a71daf7982e5a9658543f4e881285ad6 (diff)
parentf29fb4792b1fa344817d95e997ef8de4befee302 (diff)
downloadrust-b507174e82bf6d54e235c4fe71e8fe216f80ce9f.tar.gz
rust-b507174e82bf6d54e235c4fe71e8fe216f80ce9f.zip
Rollup merge of #91898 - compiler-errors:dont_suggest_closure_return_type, r=lcnr
Make `TyS::is_suggestable` check for non-suggestable types structually

Not sure if I went overboard checking substs in dyn types, etc. Let me know if I should simplify this function.

Fixes #91832
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/issue-74702.stderr4
-rw-r--r--src/test/ui/pattern/pat-tuple-overfield.stderr5
2 files changed, 1 insertions, 8 deletions
diff --git a/src/test/ui/pattern/issue-74702.stderr b/src/test/ui/pattern/issue-74702.stderr
index f2e2c8f021b..53dcf97f81c 100644
--- a/src/test/ui/pattern/issue-74702.stderr
+++ b/src/test/ui/pattern/issue-74702.stderr
@@ -22,9 +22,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-74702.rs:2:9
    |
 LL |     let (foo @ ..,) = (0, 0);
-   |         ^^^^^^^^^^^   ------ this expression has type `({integer}, {integer})`
-   |         |
-   |         expected a tuple with 2 elements, found one with 1 element
+   |         ^^^^^^^^^^^ expected a tuple with 2 elements, found one with 1 element
    |
    = note: expected tuple `({integer}, {integer})`
               found tuple `(_,)`
diff --git a/src/test/ui/pattern/pat-tuple-overfield.stderr b/src/test/ui/pattern/pat-tuple-overfield.stderr
index 1c44f7e5f6f..64b6e5eec55 100644
--- a/src/test/ui/pattern/pat-tuple-overfield.stderr
+++ b/src/test/ui/pattern/pat-tuple-overfield.stderr
@@ -150,8 +150,6 @@ LL |         E1::Z0 => {}
 error[E0308]: mismatched types
   --> $DIR/pat-tuple-overfield.rs:19:9
    |
-LL |     match (1, 2, 3) {
-   |           --------- this expression has type `({integer}, {integer}, {integer})`
 LL |         (1, 2, 3, 4) => {}
    |         ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
    |
@@ -161,9 +159,6 @@ LL |         (1, 2, 3, 4) => {}
 error[E0308]: mismatched types
   --> $DIR/pat-tuple-overfield.rs:20:9
    |
-LL |     match (1, 2, 3) {
-   |           --------- this expression has type `({integer}, {integer}, {integer})`
-LL |         (1, 2, 3, 4) => {}
 LL |         (1, 2, .., 3, 4) => {}
    |         ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
    |