Skip to content

Conversation

dima74
Copy link
Member

@dima74 dima74 commented Jul 6, 2022

Implement RsInlineFunctionDialog::ignoreOccurrence to ignore occurrences in imports. This affects the situation when a function has single usage in another module. Please see #8563 for details

Meta: #5511

changelog: Fix "Inline function" refactoring dialog when function has single usage in another module

@dima74 dima74 added the fix Pull requests that fix some bug(s) label Jul 6, 2022
Copy link
Member

@artemmukhin artemmukhin left a comment

Choose a reason for hiding this comment

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

LGTM, but would be great to provide tests for this as well. @dima74 what do you think?

@dima74
Copy link
Member Author

dima74 commented Jul 11, 2022

LGTM, but would be great to provide tests for this as well. @dima74 what do you think?

This is mostly UI change, I don't know simple approach to test it

Copy link
Member

@artemmukhin artemmukhin left a comment

Choose a reason for hiding this comment

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

LGTM, except for the lack of testing. I suppose we could try to implement them in a separate PR, using similar tests in IntelliJ repo as a reference (but I am not sure how difficult it is at the moment).

For QA: please check that the number of occurrences is shown properly. In my setup, it is not shown for some reason (on the attached screenshot there should be "Function foo() has 2 occurrences"). But it looks like the problem is out of the scope of this particular PR.
image

@dima74
Copy link
Member Author

dima74 commented Jul 14, 2022

bors r=ortem

@bors
Copy link
Contributor

bors bot commented Jul 14, 2022

Build succeeded:

@bors bors bot merged commit 4d2e96b into master Jul 14, 2022
@bors bors bot deleted the diralik/inline-function-ignore-occurrence branch July 14, 2022 20:29
@github-actions github-actions bot added this to the v175 milestone Jul 14, 2022
@neonaot neonaot self-assigned this Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix some bug(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants