-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Better handle suggestions for the already present code and fix some suggestions #126818
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy HIR ty lowering was modified cc @fmease |
This comment has been minimized.
This comment has been minimized.
2c92ade
to
ecfde6e
Compare
☔ The latest upstream changes (presumably #127296) made this pull request unmergeable. Please resolve the merge conflicts. |
ecfde6e
to
aea2e39
Compare
☔ The latest upstream changes (presumably #127898) made this pull request unmergeable. Please resolve the merge conflicts. |
aea2e39
to
fcaa2c4
Compare
☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts. |
fcaa2c4
to
49bc1a1
Compare
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.
r=me with or without suggestions 🙂
Change tests to support `rustc` wording changes With rust-lang/rust#126818 the output of rustc for resolution errors is going to change in such a way that some existing cargo tests will fail. Change them to support both the current and future output, so that those PRs can land in `rustc`. Follow up to #14135. Noticed in https://github.com/rust-lang-ci/rust/actions/runs/10192263962/job/28194880547#step:25:7529 when trying to land rust-lang/rust#126818.
When a suggestion part is for already present code, do not highlight it. If after that there are no highlights left, do not show the suggestion at all. Fix clippy lint suggestion incorrectly treated as `span_help`.
49bc1a1
to
8ce8c42
Compare
@bors r=wesleywiser |
…wiser Better handle suggestions for the already present code and fix some suggestions When a suggestion part is for code that is already present, skip it. If all the suggestion parts for a suggestion are for code that is already there, do not emit the suggestion. Fix two suggestions that treat `span_suggestion` as if it were `span_help`.
Rollup of 5 pull requests Successful merges: - rust-lang#123994 (Use Default visibility for rustc-generated C symbol declarations) - rust-lang#126818 (Better handle suggestions for the already present code and fix some suggestions) - rust-lang#127624 (Migrate and rename `issue-47551`, `issue-35164` and `issue-69368` `run-make` tests to rmake) - rust-lang#128361 (Migrate `link-cfg` and `rustdoc-default-output` `run-make` tests to rmake) - rust-lang#128436 (Update sysinfo version to 0.31.2) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#126818 (Better handle suggestions for the already present code and fix some suggestions) - rust-lang#128436 (Update sysinfo version to 0.31.2) - rust-lang#128453 (raw_eq: using it on bytes with provenance is not UB (outside const-eval)) - rust-lang#128491 ([`macro_metavar_expr_concat`] Dogfooding) - rust-lang#128494 (MIR required_consts, mentioned_items: ensure we do not forget to fill these lists) - rust-lang#128521 (rustdoc: Remove dead opaque_tys rendering logic) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126818 - estebank:suggestions-fix, r=wesleywiser Better handle suggestions for the already present code and fix some suggestions When a suggestion part is for code that is already present, skip it. If all the suggestion parts for a suggestion are for code that is already there, do not emit the suggestion. Fix two suggestions that treat `span_suggestion` as if it were `span_help`.
When a suggestion part is for code that is already present, skip it. If all the suggestion parts for a suggestion are for code that is already there, do not emit the suggestion.
Fix two suggestions that treat
span_suggestion
as if it werespan_help
.