rust/tests
bors 696aaad58c Auto merge of #109760 - MaciejWas:struct-tuple-field-names-suggestion, r=jackh726
Better diagnostic when pattern matching tuple structs

Fixes #108284

When trying to pattern match a tuple struct we might get a flawed error message if there are missing fields. E.g.

```
let x = Foo(100, 200);
if let Foo { 0: bar } = x { ... }
```

Produces this error:

```
error[E0769]: tuple variant `Foo` written as struct variant
 --> hello.rs:5:12
  |
5 |     if let Foo { 0: foo } = x {
  |            ^^^^^^^^^^^^^^
  |
help: use the tuple variant pattern syntax instead
  |
5 |     if let Foo(_, _) = x {
  |               ~~~~~~
```

Which doesn't highlight that we can still use the struct syntax but we need to fill missing fields. This pr changes this error to:

```
error[E0027]: pattern does not mention field `1`
 --> hello.rs:5:12
  |
5 |     if let Foo { 0: foo } = x {
  |            ^^^^^^^^^^^^^^ missing field `1`
  |
help: include the missing field in the pattern
  |
5 |     if let Foo { 0: foo, 1: _ } = x {
  |                        ~~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
  |
5 |     if let Foo { 0: foo, .. } = x {
  |                        ~~~~~~
```
2023-04-09 20:57:06 +00:00
..
assembly Fix an assembly test with a hard-coded hash 2023-04-05 15:59:29 +00:00
auxiliary
codegen Auto merge of #107925 - thomcc:sip13, r=cjgillot 2023-04-05 18:35:34 +00:00
codegen-units Use unused_generic_params from crate metadata 2023-03-14 16:33:12 +00:00
debuginfo Fix function order in an msvc debuginfo test 2023-04-05 15:59:29 +00:00
incremental Rollup merge of #105793 - lukas-code:circular-deps, r=Mark-Simulacrum 2023-03-19 15:33:55 +05:30
mir-opt Auto merge of #102906 - nbdd0121:mir, r=wesleywiser,tmiasko 2023-04-07 10:31:14 +00:00
pretty Auto merge of #108148 - parthopdas:master, r=oli-obk 2023-03-20 03:24:27 +00:00
run-make Fix coverage test 2023-04-07 10:18:28 +01:00
run-make-fulldeps try to fix test-various 2023-04-02 17:54:24 -04:00
run-pass-valgrind
rustdoc Bless rustdoc test with swapped ids 2023-04-05 15:59:29 +00:00
rustdoc-gui Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomez 2023-04-08 10:26:14 +02:00
rustdoc-js rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-js-std rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-json Update tests for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
rustdoc-ui Bless rustdoc-ui test with new errors order 2023-04-05 15:59:29 +00:00
ui Auto merge of #109760 - MaciejWas:struct-tuple-field-names-suggestion, r=jackh726 2023-04-09 20:57:06 +00:00
ui-fulldeps Auto merge of #109663 - fee1-dead-contrib:rustc_macros-syn-2.0, r=Nilstrieb 2023-04-07 03:37:21 +00:00
COMPILER_TESTS.md