mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
35e2027a35
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>
46 lines
1.5 KiB
Text
46 lines
1.5 KiB
Text
error: unsafe function's docs are missing a `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:9:1
|
|
|
|
|
LL | pub unsafe fn destroy_the_planet() {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::missing-safety-doc` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]`
|
|
|
|
error: unsafe function's docs are missing a `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:32:5
|
|
|
|
|
LL | pub unsafe fn republished() {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unsafe function's docs are missing a `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:40:5
|
|
|
|
|
LL | unsafe fn woefully_underdocumented(self);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: docs for unsafe trait missing `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:46:1
|
|
|
|
|
LL | pub unsafe trait UnsafeTrait {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unsafe function's docs are missing a `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:76:5
|
|
|
|
|
LL | pub unsafe fn more_undocumented_unsafe() -> Self {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unsafe function's docs are missing a `# Safety` section
|
|
--> tests/ui/doc_unsafe.rs:92:9
|
|
|
|
|
LL | pub unsafe fn whee() {
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | very_unsafe!();
|
|
| -------------- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `very_unsafe` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 6 previous errors
|
|
|