Skip to content

Commit

Permalink
Rollup merge of rust-lang#70023 - GuillaumeGomez:cleanup-e0436, r=Cen…
Browse files Browse the repository at this point in the history
…tril

clean up E0436 explanation

r? @Dylan-DPC
  • Loading branch information
Centril authored Mar 24, 2020
2 parents 2dcf54f + 4bf6734 commit 89feaf6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/librustc_error_codes/error_codes/E0436.md
Original file line number Diff line number Diff line change
@@ -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 89feaf6

Please sign in to comment.