diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 0a9edfd7334..ce540c38478 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -242,7 +242,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { cx, MISSING_SAFETY_DOC, item.span, - "unsafe trait's docs miss `# Safety` section", + "docs for unsafe trait missing `# Safety` section", ); } }, diff --git a/tests/ui/doc_unsafe.stderr b/tests/ui/doc_unsafe.stderr index d540abd1262..34ca37a6efd 100644 --- a/tests/ui/doc_unsafe.stderr +++ b/tests/ui/doc_unsafe.stderr @@ -22,7 +22,7 @@ error: unsafe function's docs miss `# Safety` section LL | unsafe fn woefully_underdocumented(self); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: unsafe trait's docs miss `# Safety` section +error: docs for unsafe trait missing `# Safety` section --> $DIR/doc_unsafe.rs:44:1 | LL | / pub unsafe trait UnsafeTrait {