Skip to content

Commit 8bd06ae

Browse files
committed
Merge and extend tests for missing_docs_in_private_items
1 parent c6ccd43 commit 8bd06ae

File tree

8 files changed

+8
-554
lines changed

8 files changed

+8
-554
lines changed

clippy_utils/src/check_proc_macro.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,14 @@ fn item_search_pat(item: &Item<'_>) -> (Pat, Pat) {
259259
ItemKind::Trait(IsAuto::Yes, ..) => (Pat::Str("auto"), Pat::Str("}")),
260260
ItemKind::Trait(..) => (Pat::Str("trait"), Pat::Str("}")),
261261
ItemKind::Impl(_) => (Pat::Str("impl"), Pat::Str("}")),
262-
_ => return (Pat::Str(""), Pat::Str("")),
262+
ItemKind::Mod(..) => (Pat::Str("mod"), Pat::Str("}")),
263+
ItemKind::Macro(_, def, _) => (
264+
Pat::Str(if def.macro_rules { "macro_rules" } else { "macro" }),
265+
Pat::Str(""),
266+
),
267+
ItemKind::TraitAlias(..) => (Pat::Str("trait"), Pat::Str(";")),
268+
ItemKind::GlobalAsm { .. } => return (Pat::Str("global_asm"), Pat::Str("")),
269+
ItemKind::Use(..) => return (Pat::Str(""), Pat::Str("")),
263270
};
264271
if item.vis_span.is_empty() {
265272
(start_pat, end_pat)

tests/ui-toml/pub_crate_missing_docs/clippy.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs

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

tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.stderr

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

tests/ui/missing_doc.rs

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

0 commit comments

Comments
 (0)