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
INSP: add inspection to check associated type bindings #5866
INSP: add inspection to check associated type bindings #5866
Conversation
2b004c1
to
9134154
Compare
Rebased over |
Checked the rest of the real projects locally, fixed some false positives. |
738eec6
to
eaeecee
Compare
Seems that false positives on CI were resolved. |
5b0ba48
to
898fb02
Compare
Finally looks like all tests passed and regressions disappeared, at least for now :D |
898fb02
to
e4a8b7d
Compare
e4a8b7d
to
fdbfc8e
Compare
Rebased on |
fdbfc8e
to
f90b8e4
Compare
f90b8e4
to
8cf90b4
Compare
@Kobzol could you please rebase on master |
8cf90b4
to
d7de449
Compare
d7de449
to
ef2a8cb
Compare
Done. |
ef2a8cb
to
736cf76
Compare
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/RemoveAssocTypeBindingFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/AddAssocTypeBindingsFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/AddAssocTypeBindingsFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/AddAssocTypeBindingsFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/AddAssocTypeBindingsFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/fixes/AddAssocTypeBindingsFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
1c325c8
to
38395bf
Compare
I tried to refactor it, let me know if it's ok :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Could you please squash the commits
src/main/kotlin/org/rust/ide/inspections/RsWrongAssocTypeArgumentsInspection.kt
Outdated
Show resolved
Hide resolved
38395bf
to
0c75aca
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors r+
Build succeeded: |
This PR adds an inspection and two quick fixes (add missing associated types, remove unknown associated types) that handle missing/erroneous associated type bindings.
There is some very similar code between
AddAssocTypeBindingsFix
andAddTypeArgumentsFix
, which handles inserting new items into type arguments. Should it be extracted? If yes, where?Related: #886