mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
143 lines
4.3 KiB
Text
143 lines
4.3 KiB
Text
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:247:5
|
|
|
|
|
LL | unsafe {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:251:14
|
|
|
|
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:251:29
|
|
|
|
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:251:48
|
|
|
|
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:255:18
|
|
|
|
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:255:37
|
|
|
|
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:259:14
|
|
|
|
|
LL | let _ = *unsafe { &42 };
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:264:19
|
|
|
|
|
LL | let _ = match unsafe {} {
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:270:14
|
|
|
|
|
LL | let _ = &unsafe {};
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:274:14
|
|
|
|
|
LL | let _ = [unsafe {}; 5];
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:278:13
|
|
|
|
|
LL | let _ = unsafe {};
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:288:8
|
|
|
|
|
LL | t!(unsafe {});
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:294:13
|
|
|
|
|
LL | unsafe {}
|
|
| ^^^^^^^^^
|
|
...
|
|
LL | t!();
|
|
| ---- in this macro invocation
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
= note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:302:5
|
|
|
|
|
LL | unsafe {} // SAFETY:
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:306:5
|
|
|
|
|
LL | unsafe {
|
|
| ^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:316:5
|
|
|
|
|
LL | unsafe {};
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:320:20
|
|
|
|
|
LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: aborting due to 17 previous errors
|
|
|