summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unnecessary_safety_comment.stderr
blob: 6d4ef6c308db841a54eecae2b72542b226588f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
error: constant item has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:6:5
   |
LL |     const CONST: u32 = 0;
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:5:5
   |
LL |     // SAFETY:
   |     ^^^^^^^^^^
   = note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`

error: static item has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:9:5
   |
LL |     static STATIC: u32 = 0;
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:8:5
   |
LL |     // SAFETY:
   |     ^^^^^^^^^^

error: struct has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:12:5
   |
LL |     struct Struct;
   |     ^^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:11:5
   |
LL |     // SAFETY:
   |     ^^^^^^^^^^

error: enum has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:15:5
   |
LL |     enum Enum {}
   |     ^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:14:5
   |
LL |     // SAFETY:
   |     ^^^^^^^^^^

error: module has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:18:5
   |
LL |     mod module {}
   |     ^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:17:5
   |
LL |     // SAFETY:
   |     ^^^^^^^^^^

error: impl has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:38:13
   |
LL |             impl T for $t {}
   |             ^^^^^^^^^^^^^^^^
...
LL |     with_safety_comment!(i32);
   |     ------------------------- in this macro invocation
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:37:13
   |
LL |             // Safety: unnecessary
   |             ^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expression has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:55:5
   |
LL |     24
   |     ^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:54:5
   |
LL |     // SAFETY: unnecessary
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: statement has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:47:5
   |
LL |     let num = 42;
   |     ^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:46:5
   |
LL |     // SAFETY: unnecessary
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: statement has unnecessary safety comment
  --> $DIR/unnecessary_safety_comment.rs:51:5
   |
LL |     if num > 24 {}
   |     ^^^^^^^^^^^^^^
   |
help: consider removing the safety comment
  --> $DIR/unnecessary_safety_comment.rs:50:5
   |
LL |     // SAFETY: unnecessary
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 9 previous errors