|
| 1 | +error: constant item has unnecessary safety comment |
| 2 | + --> $DIR/unnecessary_safety_comment.rs:6:5 |
| 3 | + | |
| 4 | +LL | const CONST: u32 = 0; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +help: consider removing the safety comment |
| 8 | + --> $DIR/unnecessary_safety_comment.rs:5:5 |
| 9 | + | |
| 10 | +LL | // SAFETY: |
| 11 | + | ^^^^^^^^^^ |
| 12 | + = note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings` |
| 13 | + |
| 14 | +error: static item has unnecessary safety comment |
| 15 | + --> $DIR/unnecessary_safety_comment.rs:8:5 |
| 16 | + | |
| 17 | +LL | static STATIC: u32 = 0; |
| 18 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | + | |
| 20 | +help: consider removing the safety comment |
| 21 | + --> $DIR/unnecessary_safety_comment.rs:7:5 |
| 22 | + | |
| 23 | +LL | // SAFETY: |
| 24 | + | ^^^^^^^^^^ |
| 25 | + |
| 26 | +error: struct has unnecessary safety comment |
| 27 | + --> $DIR/unnecessary_safety_comment.rs:10:5 |
| 28 | + | |
| 29 | +LL | struct Struct; |
| 30 | + | ^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | +help: consider removing the safety comment |
| 33 | + --> $DIR/unnecessary_safety_comment.rs:9:5 |
| 34 | + | |
| 35 | +LL | // SAFETY: |
| 36 | + | ^^^^^^^^^^ |
| 37 | + |
| 38 | +error: enum has unnecessary safety comment |
| 39 | + --> $DIR/unnecessary_safety_comment.rs:12:5 |
| 40 | + | |
| 41 | +LL | enum Enum {} |
| 42 | + | ^^^^^^^^^^^^ |
| 43 | + | |
| 44 | +help: consider removing the safety comment |
| 45 | + --> $DIR/unnecessary_safety_comment.rs:11:5 |
| 46 | + | |
| 47 | +LL | // SAFETY: |
| 48 | + | ^^^^^^^^^^ |
| 49 | + |
| 50 | +error: module has unnecessary safety comment |
| 51 | + --> $DIR/unnecessary_safety_comment.rs:14:5 |
| 52 | + | |
| 53 | +LL | mod module {} |
| 54 | + | ^^^^^^^^^^^^^ |
| 55 | + | |
| 56 | +help: consider removing the safety comment |
| 57 | + --> $DIR/unnecessary_safety_comment.rs:13:5 |
| 58 | + | |
| 59 | +LL | // SAFETY: |
| 60 | + | ^^^^^^^^^^ |
| 61 | + |
| 62 | +error: impl has unnecessary safety comment |
| 63 | + --> $DIR/unnecessary_safety_comment.rs:33:13 |
| 64 | + | |
| 65 | +LL | impl T for $t {} |
| 66 | + | ^^^^^^^^^^^^^^^^ |
| 67 | +... |
| 68 | +LL | with_safety_comment!(i32); |
| 69 | + | ------------------------- in this macro invocation |
| 70 | + | |
| 71 | +help: consider removing the safety comment |
| 72 | + --> $DIR/unnecessary_safety_comment.rs:32:13 |
| 73 | + | |
| 74 | +LL | // Safety: unnecessary |
| 75 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 76 | + = note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 77 | + |
| 78 | +error: expression has unnecessary safety comment |
| 79 | + --> $DIR/unnecessary_safety_comment.rs:48:5 |
| 80 | + | |
| 81 | +LL | 24 |
| 82 | + | ^^ |
| 83 | + | |
| 84 | +help: consider removing the safety comment |
| 85 | + --> $DIR/unnecessary_safety_comment.rs:47:5 |
| 86 | + | |
| 87 | +LL | // SAFETY: unnecessary |
| 88 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 89 | + |
| 90 | +error: statement has unnecessary safety comment |
| 91 | + --> $DIR/unnecessary_safety_comment.rs:42:5 |
| 92 | + | |
| 93 | +LL | let num = 42; |
| 94 | + | ^^^^^^^^^^^^^ |
| 95 | + | |
| 96 | +help: consider removing the safety comment |
| 97 | + --> $DIR/unnecessary_safety_comment.rs:41:5 |
| 98 | + | |
| 99 | +LL | // SAFETY: unnecessary |
| 100 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 101 | + |
| 102 | +error: statement has unnecessary safety comment |
| 103 | + --> $DIR/unnecessary_safety_comment.rs:45:5 |
| 104 | + | |
| 105 | +LL | if num > 24 {} |
| 106 | + | ^^^^^^^^^^^^^^ |
| 107 | + | |
| 108 | +help: consider removing the safety comment |
| 109 | + --> $DIR/unnecessary_safety_comment.rs:44:5 |
| 110 | + | |
| 111 | +LL | // SAFETY: unnecessary |
| 112 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 113 | + |
| 114 | +error: aborting due to 9 previous errors |
| 115 | + |
0 commit comments