Skip to content

Commit

Permalink
clean up E0436 explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 19, 2020
1 parent e5e8ba4 commit 4bf6734
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/librustc_error_codes/error_codes/E0436.md
@@ -1,5 +1,4 @@
The functional record update syntax is only allowed for structs. (Struct-like
enum variants don't qualify, for example.)
The functional record update syntax was used on something other than a struct.

Erroneous code example:

Expand All @@ -24,7 +23,9 @@ fn one_up_competitor(competitor_frequency: PublicationFrequency)
}
```

Rewrite the expression without functional record update syntax:
The functional record update syntax is only allowed for structs (struct-like
enum variants don't qualify, for example). To fix the previous code, rewrite the
expression without functional record update syntax:

```
enum PublicationFrequency {
Expand Down

0 comments on commit 4bf6734

Please sign in to comment.