diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-04-20 13:03:59 -0400 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-04-22 09:11:26 -0400 |
| commit | 303016485b63aeeaa4ad00a2102150badad3b289 (patch) | |
| tree | 828ec497f28e69f21d301cc22e7e8a9559078004 /src/librustdoc/passes | |
| parent | a850a426491e14186af2250549bf41256b5938d2 (diff) | |
| download | rust-303016485b63aeeaa4ad00a2102150badad3b289.tar.gz rust-303016485b63aeeaa4ad00a2102150badad3b289.zip | |
upgrade rustdoc's pulldown-cmark to 0.4.1
Diffstat (limited to 'src/librustdoc/passes')
| -rw-r--r-- | src/librustdoc/passes/mod.rs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/librustdoc/passes/mod.rs b/src/librustdoc/passes/mod.rs index 3c403d421c8..99aca063471 100644 --- a/src/librustdoc/passes/mod.rs +++ b/src/librustdoc/passes/mod.rs @@ -333,24 +333,24 @@ pub fn look_for_tests<'tcx>( found_tests: 0, }; - if find_testable_code(&dox, &mut tests, ErrorCodes::No).is_ok() { - if check_missing_code == true && tests.found_tests == 0 { - let mut diag = cx.tcx.struct_span_lint_hir( - lint::builtin::MISSING_DOC_CODE_EXAMPLES, - hir::CRATE_HIR_ID, - span_of_attrs(&item.attrs), - "Missing code example in this documentation"); - diag.emit(); - } else if check_missing_code == false && - tests.found_tests > 0 && - !cx.renderinfo.borrow().access_levels.is_doc_reachable(item.def_id) { - let mut diag = cx.tcx.struct_span_lint_hir( - lint::builtin::PRIVATE_DOC_TESTS, - hir::CRATE_HIR_ID, - span_of_attrs(&item.attrs), - "Documentation test in private item"); - diag.emit(); - } + find_testable_code(&dox, &mut tests, ErrorCodes::No); + + if check_missing_code == true && tests.found_tests == 0 { + let mut diag = cx.tcx.struct_span_lint_hir( + lint::builtin::MISSING_DOC_CODE_EXAMPLES, + hir::CRATE_HIR_ID, + span_of_attrs(&item.attrs), + "Missing code example in this documentation"); + diag.emit(); + } else if check_missing_code == false && + tests.found_tests > 0 && + !cx.renderinfo.borrow().access_levels.is_doc_reachable(item.def_id) { + let mut diag = cx.tcx.struct_span_lint_hir( + lint::builtin::PRIVATE_DOC_TESTS, + hir::CRATE_HIR_ID, + span_of_attrs(&item.attrs), + "Documentation test in private item"); + diag.emit(); } } |
