-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Strange borrowing issue in inherent async method. #68950
Comments
@rustbot modify labels to +A-async-await +C-bug +T-compiler |
Seems similar to #68759 .... |
This appears to have the same underlying cause as #64552 (which @csmoe is working on in #68362). When you write However, when we create the generator type, we forget that the region is rust/src/librustc_typeck/check/generator_interior.rs Lines 124 to 144 in 9b9d2af
Thus, we end up trying to process a member constraint for some newly created region As a workaround, we could special-case As in #64552, I believe the full solution is for generator types to carry 'extra' region constraints with them in some form, so that we don't lose the lexical region information that we had prior to the lowering. |
Thanks @Aaron1011. I'm going to close this as a duplicate of #64552, but note on the issue that we should add a test with the code from this issue. |
Not sure whether it's a bug, but it is indeed strange...
test2
errors with:The text was updated successfully, but these errors were encountered: