-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Prevent ICE with broken borrow in closure #108705
Conversation
Yeah, I don't like this much. Ideally we'd just find a way to get typeck and MIR building to agree on this without anyone else involved. ✨ future thoughts and fix ideas section✨ |
bd4e277
to
ac39bbf
Compare
Here's another solution - walking the pattern to look for any literals, ranges or paths to constants which could be refutable, and inserting a borrow for them. Also pretty hacky, and probably a less complete version of |
5268cf3
to
3f607b6
Compare
I'm a bit happier with this. If we fail to resolve the place, we just emit a |
3f607b6
to
95f6058
Compare
We should probably just bail out from constructing MIR if match checking fails. |
Is this blocked on #108118 then, or could this be done here without conflicting? |
95f6058
to
73ea9e6
Compare
Changed this to making the query and various functions return @rustbot ready |
73ea9e6
to
f967076
Compare
f967076
to
4ade156
Compare
4ade156
to
5792ab3
Compare
This comment has been minimized.
This comment has been minimized.
5792ab3
to
2d5ca0e
Compare
#109523 is fixed by this too |
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened. |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#108705 (Prevent ICE with broken borrow in closure) - rust-lang#111292 (Fix mishandled `--check-cfg` arguments order) - rust-lang#111382 (Isolate coverage FFI type layouts from their underlying LLVM C++ types) - rust-lang#111385 (vec-shrink-panik: update expectations to work on LLVM 17) - rust-lang#111389 (Add esp-idf platform-support page) - rust-lang#111432 (Use visit_assign to detect SSA locals.) - rust-lang#111448 (Use proper impl self type for alias impl in rustdoc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @Nilstrieb
Fixes #108683
This solution isn't ideal, I'm hoping to find a way to continue compilation without ICEing.