Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up E0436 explanation #70023

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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