rust/crates
petr-tik 2d879e0431 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
2023-12-08 11:38:54 +01:00
..
base-db internal: Bump salsa 2023-12-07 10:57:51 +01:00
cfg Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
flycheck Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
hir fix: change default diagnostic range into impl body 2023-12-07 20:45:42 +08:00
hir-def Stop offering private functions in completions 2023-12-08 11:38:54 +01:00
hir-expand internal: switch to Arc::from_iter 2023-12-06 13:08:45 -05:00
hir-ty Auto merge of #16045 - HKalbasi:rustc-tests-fixup, r=HKalbasi 2023-12-07 21:26:18 +00:00
ide Auto merge of #16028 - Young-Flash:fix-issue-16012, r=HKalbasi 2023-12-07 21:45:24 +00:00
ide-assists Auto merge of #16009 - werifu:fix-extract-function, r=Veykril 2023-12-07 17:28:41 +00:00
ide-completion Stop offering private functions in completions 2023-12-08 11:38:54 +01:00
ide-db Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
ide-diagnostics fix: change default diagnostic range into impl body 2023-12-07 20:45:42 +08:00
ide-ssr Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
intern Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
limit Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
load-cargo Pass calling span through to builtin macro expansions 2023-12-01 14:11:57 +01:00
mbe Implicit format args support 2023-12-05 17:07:00 +01:00
parser Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
paths Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
proc-macro-api Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
proc-macro-srv fix: Don't print proc-macro panic backtraces in the logs 2023-12-06 17:49:48 +01:00
proc-macro-srv-cli Re-enable proc-macros 2023-11-28 16:28:56 +01:00
proc-macro-test Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
profile Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
project-model Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
rust-analyzer Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
rustc-dependencies Bump ra-ap-rustc_index and ra-ap-rustc_abi 2023-12-05 13:40:29 +02:00
sourcegen Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
stdx Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
syntax Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
test-utils Resolve implicit format args in syntax highlighting 2023-12-05 17:07:00 +01:00
text-edit Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
toolchain Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
tt Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
vfs Allow navigation targets to be duplicated when the focus range lies in the macro definition site 2023-12-06 12:38:19 +01:00
vfs-notify Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00