Rollup merge of #70023 - GuillaumeGomez:cleanup-e0436, r=Centril
clean up E0436 explanation r? @Dylan-DPC
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
The functional record update syntax is only allowed for structs. (Struct-like
|
The functional record update syntax was used on something other than a struct.
|
||||||
enum variants don't qualify, for example.)
|
|
||||||
|
|
||||||
Erroneous code example:
|
Erroneous code example:
|
||||||
|
|
||||||
@@ -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 {
|
enum PublicationFrequency {
|
||||||
|
|||||||
Reference in New Issue
Block a user