Don't complete paths after attributes

This commit is contained in:
Lukas Wirth 2021-06-16 18:50:18 +02:00
parent 9ea6ee6b27
commit 11115ebad8
7 changed files with 151 additions and 163 deletions

View file

@ -44,7 +44,17 @@ fn completion_list_with_config(config: CompletionConfig, code: &str) -> String {
}
fn check(ra_fixture: &str, expect: Expect) {
let actual = completion_list(ra_fixture);
let base = r#"#[rustc_builtin_macro]
pub macro Clone {}
enum Enum { Variant }
struct Struct {}
#[macro_export]
macro_rules! foo {}
mod bar {}
const CONST: () = ();
trait Trait {}
"#;
let actual = completion_list(&format!("{}{}", base, ra_fixture));
expect.assert_eq(&actual)
}