Skip to content

Rust: Disambiguate associated function calls #19995

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Jul 7, 2025

No description provided.

@github-actions github-actions bot added Ruby Rust Pull requests that update Rust code labels Jul 7, 2025
@hvitved hvitved force-pushed the rust/disambiguate-assoc-function-calls branch from fc8ff54 to 0aaedf5 Compare July 8, 2025 09:06
@github-actions github-actions bot removed the Ruby label Jul 8, 2025
@hvitved hvitved force-pushed the rust/disambiguate-assoc-function-calls branch 2 times, most recently from 9ce2d5b to f3838d9 Compare July 8, 2025 12:51
@hvitved hvitved force-pushed the rust/disambiguate-assoc-function-calls branch 2 times, most recently from 217d9e3 to c2ad6f9 Compare July 8, 2025 19:39
@hvitved hvitved force-pushed the rust/disambiguate-assoc-function-calls branch from c2ad6f9 to 0ef372f Compare July 9, 2025 09:32
@@ -1350,7 +1371,7 @@
// siblings).
not exists(impl.getAttributeMacroExpansion()) and
// We use this for resolving methods, so exclude traits that do not have methods.
exists(Function f | f = trait.getASuccessor(_) and f.getParamList().hasSelfParam()) and
exists(Function f | f = trait.getAnAssocItem()) and

Check warning

Code scanning / CodeQL

Expression can be replaced with a cast Warning

The assignment to
f
in the exists(..) can replaced with an instanceof expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant