Complete macro_use attribute on modules

This commit is contained in:
Lukas Wirth 2021-06-24 21:37:07 +02:00
parent 9239943b84
commit 63b1394b70

View File

@ -177,7 +177,7 @@ macro_rules! attrs {
"recursion_limit", "type_length_limit", "windows_subsystem" "recursion_limit", "type_length_limit", "windows_subsystem"
), ),
), ),
(MODULE, attrs!(item, "no_implicit_prelude", "path")), (MODULE, attrs!(item, "macro_use", "no_implicit_prelude", "path")),
(ITEM_LIST, attrs!(item, "no_implicit_prelude")), (ITEM_LIST, attrs!(item, "no_implicit_prelude")),
(MACRO_RULES, attrs!(item, "macro_export", "macro_use")), (MACRO_RULES, attrs!(item, "macro_export", "macro_use")),
(MACRO_DEF, attrs!(item)), (MACRO_DEF, attrs!(item)),
@ -405,20 +405,21 @@ fn complete_attribute_on_module() {
check( check(
r#"#[$0] mod foo;"#, r#"#[$0] mod foo;"#,
expect![[r#" expect![[r#"
at allow() at allow()
at cfg() at cfg()
at cfg_attr() at cfg_attr()
at deny() at deny()
at forbid() at forbid()
at warn() at warn()
at deprecated at deprecated
at doc = "" at doc = ""
at doc(hidden) at doc(hidden)
at doc(alias = "") at doc(alias = "")
at must_use at must_use
at no_mangle at no_mangle
at path = "" at macro_use
"#]], at path = ""
"#]],
); );
check( check(
r#"mod foo {#![$0]}"#, r#"mod foo {#![$0]}"#,