mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
fix: private items are shown in completions for modules in fn body
This commit is contained in:
parent
687b72c36a
commit
5fdcbdddfa
2 changed files with 20 additions and 4 deletions
|
@ -923,3 +923,21 @@ fn foo() {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn private_item_in_module_in_function_body() {
|
||||
check_empty(
|
||||
r#"
|
||||
fn main() {
|
||||
mod foo {
|
||||
struct Private;
|
||||
pub struct Public;
|
||||
}
|
||||
foo::$0
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
st Public Public
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue