Skip to content

Commit 2cf2931

Browse files
committed
Merge and extend tests for missing_docs_in_private_items
1 parent 6b366ee commit 2cf2931

16 files changed

+3024
-602
lines changed

clippy_utils/src/check_proc_macro.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,14 @@ fn item_search_pat(item: &Item<'_>) -> (Pat, Pat) {
265265
ItemKind::Trait(_, IsAuto::Yes, ..) => (Pat::Str("auto"), Pat::Str("}")),
266266
ItemKind::Trait(..) => (Pat::Str("trait"), Pat::Str("}")),
267267
ItemKind::Impl(_) => (Pat::Str("impl"), Pat::Str("}")),
268-
_ => return (Pat::Str(""), Pat::Str("")),
268+
ItemKind::Mod(..) => (Pat::Str("mod"), Pat::Str("}")),
269+
ItemKind::Macro(_, def, _) => (
270+
Pat::Str(if def.macro_rules { "macro_rules" } else { "macro" }),
271+
Pat::Str(""),
272+
),
273+
ItemKind::TraitAlias(..) => (Pat::Str("trait"), Pat::Str(";")),
274+
ItemKind::GlobalAsm { .. } => return (Pat::Str("global_asm"), Pat::Str("")),
275+
ItemKind::Use(..) => return (Pat::Str(""), Pat::Str("")),
269276
};
270277
if item.vis_span.is_empty() {
271278
(start_pat, end_pat)

tests/ui-toml/missing_docs_allow_unused/missing_docs_allow_unused.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ui-toml/missing_docs_allow_unused/missing_docs_allow_unused.stderr

Lines changed: 0 additions & 29 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

tests/ui-toml/missing_docs_in_private_items/default/clippy.toml

Whitespace-only changes.

0 commit comments

Comments
 (0)