Skip to content
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

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

estebank
Copy link
Contributor

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.

@rustbot
Copy link
Collaborator

rustbot commented Jun 22, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 22, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

HIR ty lowering was modified

cc @fmease

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jul 4, 2024

☔ The latest upstream changes (presumably #127296) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Jul 18, 2024

☔ The latest upstream changes (presumably #127898) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Jul 29, 2024

☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@wesleywiser wesleywiser left a 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 🙂

compiler/rustc_errors/src/emitter.rs Outdated Show resolved Hide resolved
compiler/rustc_errors/src/emitter.rs Outdated Show resolved Hide resolved
compiler/rustc_errors/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_errors/src/lib.rs Outdated Show resolved Hide resolved
bors added a commit to rust-lang/cargo that referenced this pull request Aug 1, 2024
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`.
@estebank
Copy link
Contributor Author

estebank commented Aug 1, 2024

@bors r=wesleywiser

@bors
Copy link
Contributor

bors commented Aug 1, 2024

📌 Commit 8ce8c42 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 1, 2024
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 1, 2024
…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`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 1, 2024
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2024
…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
@bors bors merged commit d1d57bd into rust-lang:master Aug 2, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 2, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2024
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants