diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-28 21:22:06 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-28 21:22:06 +0100 |
| commit | 7cf3f8ba7a4a7c8b9dc7a44ccc1702fa7d0d2d1c (patch) | |
| tree | 89d635525e73976b7332f48044d5933806d004f9 /src | |
| parent | c1cfab230ebb2e9cb9f4ea69773fef956c706a71 (diff) | |
| download | rust-7cf3f8ba7a4a7c8b9dc7a44ccc1702fa7d0d2d1c.tar.gz rust-7cf3f8ba7a4a7c8b9dc7a44ccc1702fa7d0d2d1c.zip | |
Do not emit `missing_doc_code_examples` rustdoc lint on module and a few other items
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/passes/check_doc_test_visibility.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/librustdoc/passes/check_doc_test_visibility.rs b/src/librustdoc/passes/check_doc_test_visibility.rs index bf851b278b8..c288a3cf2a4 100644 --- a/src/librustdoc/passes/check_doc_test_visibility.rs +++ b/src/librustdoc/passes/check_doc_test_visibility.rs @@ -60,8 +60,6 @@ pub(crate) fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) - item.kind, clean::StructFieldItem(_) | clean::VariantItem(_) - | clean::AssocConstItem(..) - | clean::AssocTypeItem(..) | clean::TypeAliasItem(_) | clean::StaticItem(_) | clean::ConstantItem(..) @@ -69,6 +67,15 @@ pub(crate) fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) - | clean::ImportItem(_) | clean::PrimitiveItem(_) | clean::KeywordItem + | clean::ModuleItem(_) + | clean::TraitAliasItem(_) + | clean::ForeignFunctionItem(..) + | clean::ForeignStaticItem(..) + | clean::ForeignTypeItem + | clean::AssocConstItem(..) + | clean::AssocTypeItem(..) + | clean::TyAssocConstItem(..) + | clean::TyAssocTypeItem(..) // check for trait impl | clean::ImplItem(box clean::Impl { trait_: Some(_), .. }) ) |
