Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/tests/attribute.rs')
-rw-r--r--crates/ide-completion/src/tests/attribute.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide-completion/src/tests/attribute.rs b/crates/ide-completion/src/tests/attribute.rs
index 6dcd4f9cdd..300ea9bb11 100644
--- a/crates/ide-completion/src/tests/attribute.rs
+++ b/crates/ide-completion/src/tests/attribute.rs
@@ -1047,6 +1047,25 @@ mod cfg {
}
#[test]
+ fn inside_cfg_attr_gating_attr_macro() {
+ check(
+ r#"
+//- proc_macros: identity
+//- /main.rs cfg:feature=on
+#[cfg_attr(feat$0ure = "on", proc_macros::identity)]
+fn f() {}
+"#,
+ expect![[r#"
+ ba all
+ ba any
+ ba feature
+ ba not
+ ba true
+ "#]],
+ );
+ }
+
+ #[test]
fn complete_key_attr() {
check_edit(
"test",