Restrict completions inside visibility modifiers

This commit is contained in:
Lukas Wirth 2021-07-20 18:37:52 +02:00
parent ea105f9396
commit f6cb42fdb8
7 changed files with 53 additions and 9 deletions

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