-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix ICE in sugg::DerefDelegate with (named) closures #9120
Conversation
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
You can use |
I do have that change prototyped out, but I am not sure how confident I feel in making it, as no tests seem to exercise the No tests start failing if I comment out that match branch, allowing the catchall to |
…maxReturn (#25) * I can parse the response from the engine into a wire game state to use * Throw clap on it * Get a version working that I like * Better output, but I think it helped find a bug * WIP: Just commiting to pull in new types dep * Move all the imports from game_types to a crate inside my monorepo * Change the test to check for the win, cause it might be possible but I picked the wrong path * Use the git version instead of the local one * Fix wording * Only need to run clippy on our code * Use a version of nightly without the bug. I think this PR resolves it though: rust-lang/rust-clippy#9120 * Fix benches * The decision point is the first time there is a safe move * Ehh don't love this for docs, but it's what I need right now I think
Unless I am doing something wrong,
This ends up with kind being Attempting to add support for
This ends up in another incorrect suggestion [with I'm not exactly sure how to handle Box |
By Box can be handled by recursing on the inner type in If you can't make some form work it's fine to leave it broken and open an issue for it. A bad suggestion is still an improvement over an ICE. |
Does the change for |
This was an accidental/incomplete push, but the change does seem to work with the correct test. |
Looks good. You can squash the last couple of commits. |
rustc comiler internals helpfully tell us how to fix the issue: to get the signature of a closure, use `substs.as_closure().sig()` not `fn_sig()` Fixes ICE in rust-lang#9041
Squashed |
Thank you. @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Thanks for reviewing this @Jarcho! |
Looks like I forgot to flag this commit to close #9041 after being merged, and I can't seem to close that issue myself. |
rustc comiler internals helpfully tell us how to fix the issue:
Fixes ICE in #9041
This also makes this code in
sugg::DerefDelegate
match a different usetyp.fn_sig(…)
I found: inmixed_read_write_in_expression
-- being strict on the value oftyp.kind()
will hopefully reduce any future possibility of ICE crashes in this area.changelog: none