diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-09-16 19:07:20 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-10-01 10:03:06 +0000 |
| commit | 6ecacf76bcd9165eafdb7223e754e74982a00a4c (patch) | |
| tree | 248ed5288276e939d5cce6c04a1530317c607716 /src/librustdoc/passes/check_doc_test_visibility.rs | |
| parent | 7e90a4184437fb39904288106cfb4bfab322e18a (diff) | |
| download | rust-6ecacf76bcd9165eafdb7223e754e74982a00a4c.tar.gz rust-6ecacf76bcd9165eafdb7223e754e74982a00a4c.zip | |
rustdoc: adopt to the new lint API
Diffstat (limited to 'src/librustdoc/passes/check_doc_test_visibility.rs')
| -rw-r--r-- | src/librustdoc/passes/check_doc_test_visibility.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/librustdoc/passes/check_doc_test_visibility.rs b/src/librustdoc/passes/check_doc_test_visibility.rs index 55d5f303d34..15982b40944 100644 --- a/src/librustdoc/passes/check_doc_test_visibility.rs +++ b/src/librustdoc/passes/check_doc_test_visibility.rs @@ -125,9 +125,8 @@ pub(crate) fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item crate::lint::MISSING_DOC_CODE_EXAMPLES, hir_id, sp, - |lint| { - lint.build("missing code example in this documentation").emit(); - }, + "missing code example in this documentation", + |lint| lint, ); } } else if tests.found_tests > 0 @@ -137,9 +136,8 @@ pub(crate) fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item crate::lint::PRIVATE_DOC_TESTS, hir_id, item.attr_span(cx.tcx), - |lint| { - lint.build("documentation test in private item").emit(); - }, + "documentation test in private item", + |lint| lint, ); } } |
