fix: private items are shown in completions for modules in fn body

This commit is contained in:
Khanh Duong Quoc 2024-10-19 20:22:36 +09:00
parent 687b72c36a
commit 5fdcbdddfa
No known key found for this signature in database
GPG key ID: 68399C39885161F3
2 changed files with 20 additions and 4 deletions

View file

@ -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
"#]],
);
}