Skip to content

Import suggestion noise: add a generic parameter filter - #161182

Draft
GTimothy wants to merge 3 commits into
rust-lang:mainfrom
GTimothy:import-suggestion-generic-parameter-filter-heuristic
Draft

Import suggestion noise: add a generic parameter filter#161182
GTimothy wants to merge 3 commits into
rust-lang:mainfrom
GTimothy:import-suggestion-generic-parameter-filter-heuristic

Conversation

@GTimothy

Copy link
Copy Markdown
Contributor

Add a heuristic to reduce suggestion noise: filter out suggestions that do not need generic parameters when some were provided in the code.

This was implemented when I realised that Cloned<()> being out of scope was generating a suggestion to use Clone which:

  • does not have generic parameters
  • is a trait

This work was extracted from PR #156239.

@rustbot r? mu001999

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 16, 2026
@rust-log-analyzer

This comment has been minimized.

@GTimothy
GTimothy force-pushed the import-suggestion-generic-parameter-filter-heuristic branch from 5553da5 to 31792bf Compare August 16, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants