-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Explain behavior of _ #31352
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
Explain behavior of _ #31352
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
What about temporaries being dropped? |
That's a consequence of this behavior, I guess it does deserve its own explanation too. |
println!("Tuple is: {:?}", tuple); | ||
``` | ||
|
||
In a similar fashion to `_`, you can use `..` in a pattern to disregard |
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.
s/in a pattern/in some patterns
..
unlike _
is not an independent pattern, it's part of some other pattern's syntax
Updated to address both comments. |
👍 |
@bors r+ rollup |
📌 Commit 6c90721 has been approved by |
Fixes #31154