Skip to content

Conversation

@nicolas-guichard
Copy link
Contributor

@nicolas-guichard nicolas-guichard commented Dec 1, 2025

Operators were explicitly filtered out, both when filtering tokens to search definitions for and when searching for actual definitions.

Fixes #21127

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2025
Comment on lines -228 to -233
let tokens = tokens.filter(|token| {
matches!(
token.kind(),
IDENT | INT_NUMBER | LIFETIME_IDENT | T![self] | T![super] | T![crate] | T![Self]
)
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I removed the SyntaxKind-based filtering here because I didn't want to explicitly list all overloadable operators and get_definitions already filters out tokens that don't map to a definition, but I can add it back (with a proper SyntaxKind::is_overloadable_operator) if that's an issue.

@nicolas-guichard nicolas-guichard marked this pull request as draft December 1, 2025 11:42
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2025
Operators were explicitly filtered out, both when filtering tokens to
search definitions for and when searching for actual definitions.
@nicolas-guichard nicolas-guichard marked this pull request as ready for review December 1, 2025 11:54
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2025
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

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

Thanks!

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

SCIP index doesn't include overloaded operator calls occurrences

3 participants