-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Mir borrowck does not generate lifetime variables for 'static lifetimes during opaque type resolution #87483
Conversation
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
…es during opaque type resolution
We're seeing this ICE in beta 1.55, which was just released on 28 July:
https://github.com/ZcashFoundation/zebra/pull/2525/checks?check_run_id=3187561535#step:10:1310 Let me know if you'd like a full bug report or an attempt at minimising the code. |
@teor2345 do you know if this PR fixes the ICE you're seeing ? I would assume so, but it would be nice to have confirmation. I'll ask CI for build artifacts and when the try build completes, you'll be able to use rustup-toolchain-install-master to install the built artifacts and check. @bors try @oli-obk the fix looks good to me, you can r=me if you want or wait for david's review. We may want to beta-nominate this PR since #87287 seems to have just slipped into beta. |
⌛ Trying commit 2953a2f with merge 848106bdde5cd5ef50b0d2f597a45f2aee1eeed1... |
☀️ Try build successful - checks-actions |
@bors r=lqd |
📌 Commit 2953a2f has been approved by |
beta nominating and auto-accepting, it will be shown to the compiler team next week |
r? @lqd (just so that this doesn't show on david's todo list) |
Mir borrowck does not generate lifetime variables for 'static lifetimes during opaque type resolution Fixes rust-lang#87455 This situation was unreachable before rust-lang#87287 as we used to just grab the resolved opaque type from typeck and replaced all regions with new inference vars. After rust-lang#87287 we let the `InferCx` in mir borrowck figure out the opaque type all by itself (which it already did before, but it only used the result to sanity check with the typeck result).
Mir borrowck does not generate lifetime variables for 'static lifetimes during opaque type resolution Fixes rust-lang#87455 This situation was unreachable before rust-lang#87287 as we used to just grab the resolved opaque type from typeck and replaced all regions with new inference vars. After rust-lang#87287 we let the `InferCx` in mir borrowck figure out the opaque type all by itself (which it already did before, but it only used the result to sanity check with the typeck result).
@lqd this PR fixes the ICE we're seeing.
I also checked that the same test build fails on |
☀️ Test successful - checks-actions |
…acrum Backport PR 87483 Backport of PR rust-lang#87483: "Mir borrowck does not generate lifetime variables for 'static lifetimes during opaque type resolution" Fix rust-lang#87455: "ICE: unexpected concrete region in borrowck: ReStatic"
Backported in #88190 |
Fixes #87455
This situation was unreachable before #87287 as we used to just grab the resolved opaque type from typeck and replaced all regions with new inference vars. After #87287 we let the
InferCx
in mir borrowck figure out the opaque type all by itself (which it already did before, but it only used the result to sanity check with the typeck result).