Skip to content

Commit 35e2027

Browse files
committed
Fix grammer for the Safety documentation check
The original message ("unsafe function's docs miss `# Safety` section") reads quite awkwardly. I've changed it to "unsafe function's docs are missing a `# Safety` section" to have it read better. Signed-off-by: Paul R. Tagliamonte <[email protected]>
1 parent 10d1f32 commit 35e2027

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

clippy_lints/src/doc/missing_headers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn check(
3737
cx,
3838
MISSING_SAFETY_DOC,
3939
span,
40-
"unsafe function's docs miss `# Safety` section",
40+
"unsafe function's docs are missing a `# Safety` section",
4141
),
4242
(true, Safety::Safe) => span_lint(
4343
cx,

tests/ui-toml/private-doc-errors/doc_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub mod __macro {
4747
pub struct T;
4848
impl T {
4949
pub unsafe fn f() {}
50-
//~^ ERROR: unsafe function's docs miss `# Safety` section
50+
//~^ ERROR: unsafe function's docs are missing a `# Safety` section
5151
}
5252
}
5353

tests/ui-toml/private-doc-errors/doc_lints.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ note: the lint level is defined here
5151
LL | clippy::missing_panics_doc
5252
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
5353

54-
error: unsafe function's docs miss `# Safety` section
54+
error: unsafe function's docs are missing a `# Safety` section
5555
--> tests/ui-toml/private-doc-errors/doc_lints.rs:49:9
5656
|
5757
LL | pub unsafe fn f() {}

tests/ui/doc_unsafe.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: unsafe function's docs miss `# Safety` section
1+
error: unsafe function's docs are missing a `# Safety` section
22
--> tests/ui/doc_unsafe.rs:9:1
33
|
44
LL | pub unsafe fn destroy_the_planet() {
@@ -7,13 +7,13 @@ LL | pub unsafe fn destroy_the_planet() {
77
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
88
= help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
99

10-
error: unsafe function's docs miss `# Safety` section
10+
error: unsafe function's docs are missing a `# Safety` section
1111
--> tests/ui/doc_unsafe.rs:32:5
1212
|
1313
LL | pub unsafe fn republished() {
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515

16-
error: unsafe function's docs miss `# Safety` section
16+
error: unsafe function's docs are missing a `# Safety` section
1717
--> tests/ui/doc_unsafe.rs:40:5
1818
|
1919
LL | unsafe fn woefully_underdocumented(self);
@@ -25,13 +25,13 @@ error: docs for unsafe trait missing `# Safety` section
2525
LL | pub unsafe trait UnsafeTrait {
2626
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2727

28-
error: unsafe function's docs miss `# Safety` section
28+
error: unsafe function's docs are missing a `# Safety` section
2929
--> tests/ui/doc_unsafe.rs:76:5
3030
|
3131
LL | pub unsafe fn more_undocumented_unsafe() -> Self {
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333

34-
error: unsafe function's docs miss `# Safety` section
34+
error: unsafe function's docs are missing a `# Safety` section
3535
--> tests/ui/doc_unsafe.rs:92:9
3636
|
3737
LL | pub unsafe fn whee() {

0 commit comments

Comments
 (0)