-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
is_binding_pat
: use explicit match & include or-pats in grammar
#67428
Conversation
@@ -1221,7 +1223,13 @@ fn resolve_local<'tcx>( | |||
is_binding_pat(&subpat) | |||
} | |||
|
|||
_ => false, | |||
PatKind::Ref(_, _) | |
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.
So it never applies to let & mut? ref mut? x
atm -- why is that?
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.
Because it generally wouldn't be helpful. Extending the storage lifetime of a reference doesn't extend the lifetime of what it points to.
@bors r+ |
📌 Commit 4414f0d has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
…ewjasper `is_binding_pat`: use explicit match & include or-pats in grammar r? @matthewjasper @nikomatsakis
…ewjasper `is_binding_pat`: use explicit match & include or-pats in grammar r? @matthewjasper @nikomatsakis
Rollup of 6 pull requests Successful merges: - #67130 (Const prop should finish propagation into user defined variables) - #67163 (Split up ptr/mod.rs in libcore...) - #67314 (Don't suppress move errors for union fields) - #67392 (Fix unresolved type span inside async object) - #67404 (Separate region inference logic from error handling better) - #67428 (`is_binding_pat`: use explicit match & include or-pats in grammar) Failed merges: r? @ghost
cc #54883
r? @matthewjasper @nikomatsakis