-
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
Borrow Checker (?) panics #47189
Comments
Looks like the bug is actually the unimplemented error reporting in
|
I am just guessing here, but since these two variants are so similar:
and error reporting for
TyGenerator(DefId, _, _) .
Just a guess - don't really know how generators are implemented in the compiler 😕. |
Seems likely to be par of MIR borrowck, though. I'm tagging with WG-compiler-nll. |
So I have a fix for this issue that causes us to accept the code. I am not entirely sure if we should be accepting it, though. I have to look more closely at the MIR, I guess. |
Well, I opened a PR to at least fix the ICE. |
…akis renumber regions in generators This fixes #47189, but I think we still have to double check various things around how to treat generators in MIR type check + borrow check (e.g., what borrows should be invalidated by a `Suspend`? What consistency properties should type check be enforcing anyway around the "interior" type?) Also fixes #47587 thanks to @spastorino's commit. r? @pnkfelix
While investigating bug in generators (#45259), I ran into an issue that seems to exist since non-lexical lifetimes landed. I guess it's a bug in the borrow checker - at least, that's what the backtrace says.
The code that raises the compiler panic is:
The compiler's backtrace reads:
The text was updated successfully, but these errors were encountered: