-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Missing help on pattern guard #33247
Comments
Hmm, need to be careful though... if the pattern guard actually consumes the value then you'll get a bug report for the compiler recommending wrong code: http://is.gd/zGSj9C |
Hum... Then maybe an update of the error code explanation would be more appropriate to show the differences between the two cases. |
Hmm, using |
@mrmiywj: That's the point that durka pointed out. So that's why I propose to only change error explanation to reflect both cases. |
You mean that if in the context the ownership will not be taken, it is suggested to use |
Haha! Please do it if you want. cc me on the PR so I can review it (and don't forget to say "Fixes #33247"). |
Fixed by #33260 |
One the following code, suggesting to use
ref
keyword would be very appreciated I think.The text was updated successfully, but these errors were encountered: