diff options
| author | y21 <30553356+y21@users.noreply.github.com> | 2023-11-28 19:14:37 +0100 |
|---|---|---|
| committer | y21 <30553356+y21@users.noreply.github.com> | 2023-11-28 19:14:37 +0100 |
| commit | 0565267f3763c5f6a244db66f03cbff00ef0c62a (patch) | |
| tree | 54e3faba6a58587ab20f6dd1263d5d02e6fc1295 | |
| parent | e6f33905e81e232abc7682e79d2e54b4fde7444a (diff) | |
| download | rust-0565267f3763c5f6a244db66f03cbff00ef0c62a.tar.gz rust-0565267f3763c5f6a244db66f03cbff00ef0c62a.zip | |
rename `DocMarkdown` to `Documentation`
| -rw-r--r-- | clippy_lints/src/doc/mod.rs | 9 | ||||
| -rw-r--r-- | clippy_lints/src/lib.rs | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/clippy_lints/src/doc/mod.rs b/clippy_lints/src/doc/mod.rs index 18874b1cb8e..a11d5622b4d 100644 --- a/clippy_lints/src/doc/mod.rs +++ b/clippy_lints/src/doc/mod.rs @@ -305,15 +305,14 @@ declare_clippy_lint! { "suspicious usage of (outer) doc comments" } -#[expect(clippy::module_name_repetitions)] #[derive(Clone)] -pub struct DocMarkdown { +pub struct Documentation { valid_idents: FxHashSet<String>, in_trait_impl: bool, check_private_items: bool, } -impl DocMarkdown { +impl Documentation { pub fn new(valid_idents: &[String], check_private_items: bool) -> Self { Self { valid_idents: valid_idents.iter().cloned().collect(), @@ -323,7 +322,7 @@ impl DocMarkdown { } } -impl_lint_pass!(DocMarkdown => [ +impl_lint_pass!(Documentation => [ DOC_LINK_WITH_QUOTES, DOC_MARKDOWN, MISSING_SAFETY_DOC, @@ -334,7 +333,7 @@ impl_lint_pass!(DocMarkdown => [ SUSPICIOUS_DOC_COMMENTS ]); -impl<'tcx> LateLintPass<'tcx> for DocMarkdown { +impl<'tcx> LateLintPass<'tcx> for Documentation { fn check_crate(&mut self, cx: &LateContext<'tcx>) { let attrs = cx.tcx.hir().attrs(hir::CRATE_HIR_ID); check_attrs(cx, &self.valid_idents, attrs); diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index abe768d50c7..1c59b2df853 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -747,7 +747,7 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) { avoid_breaking_exported_api, )) }); - store.register_late_pass(move |_| Box::new(doc::DocMarkdown::new(doc_valid_idents, check_private_items))); + store.register_late_pass(move |_| Box::new(doc::Documentation::new(doc_valid_idents, check_private_items))); store.register_late_pass(|_| Box::new(neg_multiply::NegMultiply)); store.register_late_pass(|_| Box::new(let_if_seq::LetIfSeq)); store.register_late_pass(|_| Box::new(mixed_read_write_in_expression::EvalOrderDependence)); |
