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.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ide-completion/src/tests/attribute.rs b/crates/ide-completion/src/tests/attribute.rs
index 1578ba2c37..4e60820dd6 100644
--- a/crates/ide-completion/src/tests/attribute.rs
+++ b/crates/ide-completion/src/tests/attribute.rs
@@ -607,6 +607,30 @@ fn attr_in_source_file_end() {
);
}
+#[test]
+fn invalid_path() {
+ check(
+ r#"
+//- proc_macros: identity
+#[proc_macros:::$0]
+struct Foo;
+"#,
+ expect![[r#""#]],
+ );
+
+ check(
+ r#"
+//- minicore: derive, copy
+mod foo {
+ pub use Copy as Bar;
+}
+#[derive(foo:::::$0)]
+struct Foo;
+"#,
+ expect![""],
+ );
+}
+
mod cfg {
use super::*;