mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Restrict completions inside visibility modifiers
This commit is contained in:
parent
ea105f9396
commit
f6cb42fdb8
7 changed files with 53 additions and 9 deletions
24
crates/ide_completion/src/tests/visibility.rs
Normal file
24
crates/ide_completion/src/tests/visibility.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
//! Completion tests for visibility modifiers.
|
||||
use expect_test::{expect, Expect};
|
||||
|
||||
use crate::tests::completion_list;
|
||||
|
||||
fn check(ra_fixture: &str, expect: Expect) {
|
||||
let actual = completion_list(ra_fixture);
|
||||
expect.assert_eq(&actual)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_pub() {
|
||||
check(
|
||||
r#"
|
||||
pub($0)
|
||||
"#,
|
||||
expect![[r#"
|
||||
kw in
|
||||
kw self
|
||||
kw super
|
||||
kw crate
|
||||
"#]],
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue