summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/passes/check_doc_test_visibility.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/passes/check_doc_test_visibility.rs')
-rw-r--r--src/librustdoc/passes/check_doc_test_visibility.rs11
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 e732a4057..d1c4cc1f5 100644
--- a/src/librustdoc/passes/check_doc_test_visibility.rs
+++ b/src/librustdoc/passes/check_doc_test_visibility.rs
@@ -60,7 +60,7 @@ pub(crate) fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -
| clean::VariantItem(_)
| clean::AssocConstItem(..)
| clean::AssocTypeItem(..)
- | clean::TypedefItem(_)
+ | clean::TypeAliasItem(_)
| clean::StaticItem(_)
| clean::ConstantItem(_)
| clean::ExternCrateItem { .. }
@@ -113,7 +113,14 @@ pub(crate) fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item
let mut tests = Tests { found_tests: 0 };
- find_testable_code(dox, &mut tests, ErrorCodes::No, false, None);
+ find_testable_code(
+ dox,
+ &mut tests,
+ ErrorCodes::No,
+ false,
+ None,
+ cx.tcx.features().custom_code_classes_in_docs,
+ );
if tests.found_tests == 0 && cx.tcx.features().rustdoc_missing_doc_code_examples {
if should_have_doc_example(cx, item) {