-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Closure migration multispan suggestions #87958
Closure migration multispan suggestions #87958
Conversation
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #87980) made this pull request unmergeable. Please resolve the merge conflicts. |
02772dd
to
6431097
Compare
r? @estebank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it would be slightly easier to read if we had a single multpart_suggestion
call and the branching logic got you the messages, applicability and necessary vector, but I'm not too bothered either way.
r=me with or without the suggested changes.
I prefer calling it multiple times to avoid having to chase variables around, and to make it easier to make modifications to one of those cases later. E.g. using the @bors r=estebank |
📌 Commit 6431097 has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#87178 ([rustdoc] Copy only item path to clipboard rather than full `use` statement.) - rust-lang#87677 (Adding explicit notice of lack of documentation for Tier 2 Platforms) - rust-lang#87958 (Closure migration multispan suggestions) - rust-lang#87967 (Detect fake spans in non_fmt_panic lint.) - rust-lang#88011 (Enable `--all-targets` for `x.py check` unconditionally) - rust-lang#88030 (Assign FIXMEs to me and remove obsolete ones) - rust-lang#88052 (Update redox_syscall) - rust-lang#88055 (Update RELEASES.md for 1.55.0) - rust-lang#88080 (Skip assert ICE with default_method_body_is_const) - rust-lang#88089 (Rustdoc font test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This changes the
rust_2021_incompatible_closure_captures
lint to only suggest inserting the parts that need to be inserted, instead of suggesting to replace the entire closure by an almost identical closure with one statement added.Before:
After: