mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Merge #9398
9398: minor: Complete `macro_use` attribute on modules r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
c8d0ca8080
1 changed files with 16 additions and 15 deletions
|
@ -177,7 +177,7 @@ static KIND_TO_ATTRIBUTES: Lazy<FxHashMap<SyntaxKind, &[&str]>> = Lazy::new(|| {
|
|||
"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")),
|
||||
(MACRO_RULES, attrs!(item, "macro_export", "macro_use")),
|
||||
(MACRO_DEF, attrs!(item)),
|
||||
|
@ -405,20 +405,21 @@ mod tests {
|
|||
check(
|
||||
r#"#[$0] mod foo;"#,
|
||||
expect![[r#"
|
||||
at allow(…)
|
||||
at cfg(…)
|
||||
at cfg_attr(…)
|
||||
at deny(…)
|
||||
at forbid(…)
|
||||
at warn(…)
|
||||
at deprecated
|
||||
at doc = "…"
|
||||
at doc(hidden)
|
||||
at doc(alias = "…")
|
||||
at must_use
|
||||
at no_mangle
|
||||
at path = "…"
|
||||
"#]],
|
||||
at allow(…)
|
||||
at cfg(…)
|
||||
at cfg_attr(…)
|
||||
at deny(…)
|
||||
at forbid(…)
|
||||
at warn(…)
|
||||
at deprecated
|
||||
at doc = "…"
|
||||
at doc(hidden)
|
||||
at doc(alias = "…")
|
||||
at must_use
|
||||
at no_mangle
|
||||
at macro_use
|
||||
at path = "…"
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r#"mod foo {#![$0]}"#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue