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 <paultag@gmail.com>
This commit is contained in:
parent
10d1f32685
commit
35e2027a35
@ -37,7 +37,7 @@ pub fn check(
|
|||||||
cx,
|
cx,
|
||||||
MISSING_SAFETY_DOC,
|
MISSING_SAFETY_DOC,
|
||||||
span,
|
span,
|
||||||
"unsafe function's docs miss `# Safety` section",
|
"unsafe function's docs are missing a `# Safety` section",
|
||||||
),
|
),
|
||||||
(true, Safety::Safe) => span_lint(
|
(true, Safety::Safe) => span_lint(
|
||||||
cx,
|
cx,
|
||||||
|
@ -47,7 +47,7 @@ pub mod __macro {
|
|||||||
pub struct T;
|
pub struct T;
|
||||||
impl T {
|
impl T {
|
||||||
pub unsafe fn f() {}
|
pub unsafe fn f() {}
|
||||||
//~^ ERROR: unsafe function's docs miss `# Safety` section
|
//~^ ERROR: unsafe function's docs are missing a `# Safety` section
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ note: the lint level is defined here
|
|||||||
LL | clippy::missing_panics_doc
|
LL | clippy::missing_panics_doc
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui-toml/private-doc-errors/doc_lints.rs:49:9
|
--> tests/ui-toml/private-doc-errors/doc_lints.rs:49:9
|
||||||
|
|
|
|
||||||
LL | pub unsafe fn f() {}
|
LL | pub unsafe fn f() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui/doc_unsafe.rs:9:1
|
--> tests/ui/doc_unsafe.rs:9:1
|
||||||
|
|
|
|
||||||
LL | pub unsafe fn destroy_the_planet() {
|
LL | pub unsafe fn destroy_the_planet() {
|
||||||
@ -7,13 +7,13 @@ LL | pub unsafe fn destroy_the_planet() {
|
|||||||
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
|
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
|
||||||
= help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
|
= help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
|
||||||
|
|
||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui/doc_unsafe.rs:32:5
|
--> tests/ui/doc_unsafe.rs:32:5
|
||||||
|
|
|
|
||||||
LL | pub unsafe fn republished() {
|
LL | pub unsafe fn republished() {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui/doc_unsafe.rs:40:5
|
--> tests/ui/doc_unsafe.rs:40:5
|
||||||
|
|
|
|
||||||
LL | unsafe fn woefully_underdocumented(self);
|
LL | unsafe fn woefully_underdocumented(self);
|
||||||
@ -25,13 +25,13 @@ error: docs for unsafe trait missing `# Safety` section
|
|||||||
LL | pub unsafe trait UnsafeTrait {
|
LL | pub unsafe trait UnsafeTrait {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui/doc_unsafe.rs:76:5
|
--> tests/ui/doc_unsafe.rs:76:5
|
||||||
|
|
|
|
||||||
LL | pub unsafe fn more_undocumented_unsafe() -> Self {
|
LL | pub unsafe fn more_undocumented_unsafe() -> Self {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unsafe function's docs miss `# Safety` section
|
error: unsafe function's docs are missing a `# Safety` section
|
||||||
--> tests/ui/doc_unsafe.rs:92:9
|
--> tests/ui/doc_unsafe.rs:92:9
|
||||||
|
|
|
|
||||||
LL | pub unsafe fn whee() {
|
LL | pub unsafe fn whee() {
|
||||||
|
Loading…
Reference in New Issue
Block a user