mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
267 lines
8.4 KiB
Text
267 lines
8.4 KiB
Text
error: unsafe block missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:257:19
|
|
|
|
|
LL | /* Safety: */ 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:261: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:265: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:265: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:265: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:269: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:269: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:273: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:278: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:284: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:288: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:292: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:302: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:308: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:316: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:320: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:330: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:334:20
|
|
|
|
|
LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:341:5
|
|
|
|
|
LL | unsafe impl A for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:348:9
|
|
|
|
|
LL | unsafe impl B for (u32) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:369:13
|
|
|
|
|
LL | unsafe impl T for $t {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | no_safety_comment!(());
|
|
| ---------------------- in this macro invocation
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:394:13
|
|
|
|
|
LL | unsafe impl T for $t {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | no_safety_comment!(());
|
|
| ---------------------- in this macro invocation
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:402:5
|
|
|
|
|
LL | unsafe impl T for (i32) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:394:13
|
|
|
|
|
LL | unsafe impl T for $t {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | no_safety_comment!(u32);
|
|
| ----------------------- in this macro invocation
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:408:5
|
|
|
|
|
LL | unsafe impl T for (bool) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:454:5
|
|
|
|
|
LL | unsafe impl NoComment for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:458:19
|
|
|
|
|
LL | /* SAFETY: */ unsafe impl InlineComment for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:462:5
|
|
|
|
|
LL | unsafe impl TrailingComment for () {} // SAFETY:
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:467:5
|
|
|
|
|
LL | unsafe impl Interference for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:474:5
|
|
|
|
|
LL | unsafe impl ImplInFn for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: unsafe impl missing a safety comment
|
|
--> $DIR/undocumented_unsafe_blocks.rs:483:1
|
|
|
|
|
LL | unsafe impl CrateRoot for () {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding a safety comment on the preceding line
|
|
|
|
error: aborting due to 31 previous errors
|
|
|