mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-04 01:08:47 +00:00
2d879e0431
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 |
||
---|---|---|
.. | ||
completions | ||
context | ||
render | ||
tests | ||
completions.rs | ||
config.rs | ||
context.rs | ||
item.rs | ||
lib.rs | ||
render.rs | ||
snippet.rs | ||
tests.rs |