Skip to content

Commit 8650628

Browse files
Clean up E0027
1 parent 88acc84 commit 8650628

File tree

1 file changed

+5
-5
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-5
lines changed

src/librustc_error_codes/error_codes/E0027.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
This error indicates that a pattern for a struct fails to specify a sub-pattern
2-
for every one of the struct's fields. Ensure that each field from the struct's
3-
definition is mentioned in the pattern, or use `..` to ignore unwanted fields.
1+
A pattern for a struct fails to specify a sub-pattern for every one of the
2+
struct's fields.
43

5-
For example:
4+
Erroneous code example:
65

76
```compile_fail,E0027
87
struct Dog {
@@ -18,7 +17,8 @@ match d {
1817
}
1918
```
2019

21-
This is correct (explicit):
20+
To fix this error, ensure that each field from the struct's definition is
21+
mentioned in the pattern, or use `..` to ignore unwanted fields. Example:
2222

2323
```
2424
struct Dog {

0 commit comments

Comments
 (0)