Skip to content

Commit 91c5653

Browse files
committed
Auto merge of #11892 - y21:actually_rename_doc_for_real_this_time, r=Manishearth
rename `DocMarkdown` pass to `Documentation` Followup of #11801 This was discussed in todays meeting: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202023-11-28/near/404667082 Decided to go with `Documentation`, because this would also make it consistent with how `Attributes` is named in `attrs.rs` (and it also sounds good). changelog: none
2 parents e6f3390 + 0565267 commit 91c5653

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

clippy_lints/src/doc/mod.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,14 @@ declare_clippy_lint! {
305305
"suspicious usage of (outer) doc comments"
306306
}
307307

308-
#[expect(clippy::module_name_repetitions)]
309308
#[derive(Clone)]
310-
pub struct DocMarkdown {
309+
pub struct Documentation {
311310
valid_idents: FxHashSet<String>,
312311
in_trait_impl: bool,
313312
check_private_items: bool,
314313
}
315314

316-
impl DocMarkdown {
315+
impl Documentation {
317316
pub fn new(valid_idents: &[String], check_private_items: bool) -> Self {
318317
Self {
319318
valid_idents: valid_idents.iter().cloned().collect(),
@@ -323,7 +322,7 @@ impl DocMarkdown {
323322
}
324323
}
325324

326-
impl_lint_pass!(DocMarkdown => [
325+
impl_lint_pass!(Documentation => [
327326
DOC_LINK_WITH_QUOTES,
328327
DOC_MARKDOWN,
329328
MISSING_SAFETY_DOC,
@@ -334,7 +333,7 @@ impl_lint_pass!(DocMarkdown => [
334333
SUSPICIOUS_DOC_COMMENTS
335334
]);
336335

337-
impl<'tcx> LateLintPass<'tcx> for DocMarkdown {
336+
impl<'tcx> LateLintPass<'tcx> for Documentation {
338337
fn check_crate(&mut self, cx: &LateContext<'tcx>) {
339338
let attrs = cx.tcx.hir().attrs(hir::CRATE_HIR_ID);
340339
check_attrs(cx, &self.valid_idents, attrs);

clippy_lints/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
747747
avoid_breaking_exported_api,
748748
))
749749
});
750-
store.register_late_pass(move |_| Box::new(doc::DocMarkdown::new(doc_valid_idents, check_private_items)));
750+
store.register_late_pass(move |_| Box::new(doc::Documentation::new(doc_valid_idents, check_private_items)));
751751
store.register_late_pass(|_| Box::new(neg_multiply::NegMultiply));
752752
store.register_late_pass(|_| Box::new(let_if_seq::LetIfSeq));
753753
store.register_late_pass(|_| Box::new(mixed_read_write_in_expression::EvalOrderDependence));

0 commit comments

Comments
 (0)