Skip to content

fix(diag): Remove sometimes-invalid removal suggestions - #17139

Merged
weihanglo merged 3 commits into
rust-lang:masterfrom
epage:suggest
Jun 26, 2026
Merged

fix(diag): Remove sometimes-invalid removal suggestions #17139
weihanglo merged 3 commits into
rust-lang:masterfrom
epage:suggest

Conversation

@epage

@epage epage commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

Depending on where a removal shows up (like a basic key-value pair), it
can be valid.
However, it won't be if

  • the key is for a standard table
  • the key is used with dotted keys
  • there is a comma after the value

For now, we'll remove this.
I'll open an issue for adding these back in.
One idea is we re-parse using toml_parse, detect our case, and
directly edit the token stream to find the removal span.

Fixes #16982

How to test and review this PR?

epage added 3 commits June 26, 2026 11:24
Depending on where a removal shows up (like a basic key-value pair), it
can be valid.
However, it won't be if
- the key is for a standard table
- the key is used with dotted keys
- there is a comma after the value

For now, we'll remove this.
I'll open an issue for adding these back in.
One idea is we re-parse using `toml_parse`, detect our case, and
directly edit the token stream to find the removal span.

Fixes rust-lang#16982
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2026
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

r? @ehuss

rustbot has assigned @ehuss.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

}
primary = primary.element(Level::NOTE.message(emitted_source));
let mut report = vec![primary];
let mut help =

@weihanglo weihanglo Jun 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw no snapshot diff in this commit. Do we have any user-visible behavior change, or should this be considered a refactor?

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I got why.

@weihanglo
weihanglo enabled auto-merge June 26, 2026 20:01
@weihanglo
weihanglo added this pull request to the merge queue Jun 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@weihanglo
weihanglo added this pull request to the merge queue Jun 26, 2026
Merged via the queue into rust-lang:master with commit a335d47 Jun 26, 2026
56 of 58 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2026
@epage
epage deleted the suggest branch June 26, 2026 21:19
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 27, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
@rustbot rustbot added this to the 1.98.0 milestone Jun 27, 2026
faukah pushed a commit to faukah/miri that referenced this pull request Jun 28, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
pull Bot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request Jun 29, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
ghaaj pushed a commit to ghaaj/polygrammar that referenced this pull request Aug 7, 2026
Update cargo submodules

6 commits in a595d0da21f228b7fdae64d3d5c0e527ea66bb59..a335d47ff8036918d3d548dabd513dc0444096a9
2026-06-20 13:42:59 +0000 to 2026-06-26 20:39:41 +0000
- fix(diag): Remove sometimes-invalid removal suggestions  (rust-lang/cargo#17139)
- feat: Add `-Zhint-msrv` flag (rust-lang/cargo#17106)
- fix: LockManager use OS-aware flock shim (rust-lang/cargo#17128)
- fix: flaky test: sparse_blocking_count (rust-lang/cargo#17130)
- Add Solaris fcntl file locking (rust-lang/cargo#17110)
- fix(test): skip dwp uplift test without packed debuginfo (rust-lang/cargo#17127)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect suggestion-diff for lint unused_workspace_dependencies

4 participants