-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop offering private functions in completions
Before Private functions have RawVisibility module, but were missed because take_types returned None early. After resolve_visibility returned None, Visibility::Public was set instead and private functions ended up being offered in autocompletion. Choosing such a function results in an immediate error diagnostic about using a private function. After Pattern match of take_types that returns None and query for Module-level visibility from the original_module Fix #15134 - tested with a unit test and a manual end-to-end test of building rust-analyzer from my branch and opening the reproduction repository REVIEW Refactor to move scope_def_applicable and check function visibility from a module Please let me know what's the best way to add a unit tests to nameres, which is where the root cause was
- Loading branch information
Showing
3 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters