]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0027
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Nov 2019 12:13:18 +0000 (13:13 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Nov 2019 12:24:47 +0000 (13:24 +0100)
src/librustc_error_codes/error_codes/E0027.md

index ab2a20fe9e56d00fb9472b30cbc542a604aeaa71..a8b1340ca0c780c7aa83e63c502d3d1b8bf70f66 100644 (file)
@@ -1,8 +1,7 @@
-This error indicates that a pattern for a struct fails to specify a sub-pattern
-for every one of the struct's fields. Ensure that each field from the struct's
-definition is mentioned in the pattern, or use `..` to ignore unwanted fields.
+A pattern for a struct fails to specify a sub-pattern for every one of the
+struct's fields.
 
-For example:
+Erroneous code example:
 
 ```compile_fail,E0027
 struct Dog {
@@ -18,7 +17,8 @@ match d {
 }
 ```
 
-This is correct (explicit):
+To fix this error, ensure that each field from the struct's definition is
+mentioned in the pattern, or use `..` to ignore unwanted fields. Example:
 
 ```
 struct Dog {