-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add error description for E0436 #32899
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -3426,6 +3426,47 @@ parameters. You can read more about it in the API documentation: | |||
https://doc.rust-lang.org/std/marker/struct.PhantomData.html | |||
"##, | |||
|
|||
E0436: r##" | |||
Functional update syntax can only be used on struct types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain what functional update syntax actually is here. It's not a concept which is obvious from the name.
Rebased |
|
||
fn baz(Foo f) -> Foo { | ||
match f { | ||
// Match each variant of the enum and bind each value to a name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Bind the type with same y field value"
|
||
fn baz(Foo f) -> Foo { | ||
match f { | ||
// Match each variant of the enum and bind each field to a name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not good.
☔ The latest upstream changes (presumably #32989) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing due to inactivity, but feel free to reopen with a rebase! |
Part of #32777