-
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
rvalue lifetime too short when equivalent match
works
#7660
Comments
Nominating for production-ready: after niko's patches about ref bindings in irrefut patterns landed, this form of destructuring assignment is almost there! It's really painful to use |
This is also a continuation of the bug in #4653 (the llvm assertions of which were very recently fixed). |
I'll take a look. This does indeed look like regionck is failing to propagate the necessary constraints. |
This is still an issue. |
Accepted for production-ready |
cc @flaper87 |
I...expect this may work now but I'm not entirely sure. |
I does compile now, I'll submit a test case for it |
Fix derivable impl false positives fix rust-lang#7654 fix rust-lang#7655 changelog: none (not released)
Sometimes the lifetime of an expression is considered too short when it's an rvalue, but the equivalent code using
match
works just fine:This may be related to #3511, but this seems like it may just be a bug in lifetimes somewhere?
ping @nikomatsakis
The text was updated successfully, but these errors were encountered: