Skip to content

fix: resolve path to skip traits in unwrap_type_to_generic_arg - #23775

Merged
A4-Tacks merged 1 commit into
rust-lang:masterfrom
barrettbox:unwrap-type-resolve-trait
Dec 5, 2026
Merged

A4-Tacks merged 1 commit into
rust-lang:masterfrom
barrettbox:unwrap-type-resolve-trait

Conversation

@barrettbox

@barrettbox barrettbox commented Dec 5, 2026 •

Copy link
Copy Markdown

Fixes #23770

Context

Follow up on #23774 which checked where the name was in the code (syntax) instead of what it is.

What changed

We now resolve the path under the cursor and skip the assist when it resolves to a trait, as maintainers suggested. This replaces #23774 's bound and impl checks.

Tests

Tests are unchanged and still pass.

AI Disclosure

Used Claude to learn about the issue and suggest a fix, which I reviewed and understand.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 5, 2026
@A4-Tacks
A4-Tacks added this pull request to the merge queue Dec 5, 2026
Merged via the queue into rust-lang:master with commit ab4c80c Dec 5, 2026
20 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 5, 2026
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.

Rather useless suggestion to unwrap trait on impl header.

4 participants