1
1
error: unsafe block missing a safety comment
2
- --> $DIR/undocumented_unsafe_blocks.rs:263 :19
2
+ --> $DIR/undocumented_unsafe_blocks.rs:266 :19
3
3
|
4
4
LL | /* Safety: */ unsafe {}
5
5
| ^^^^^^^^^
@@ -9,103 +9,103 @@ LL | /* Safety: */ unsafe {}
9
9
= help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
10
10
11
11
error: unsafe block missing a safety comment
12
- --> $DIR/undocumented_unsafe_blocks.rs:267 :5
12
+ --> $DIR/undocumented_unsafe_blocks.rs:270 :5
13
13
|
14
14
LL | unsafe {}
15
15
| ^^^^^^^^^
16
16
|
17
17
= help: consider adding a safety comment on the preceding line
18
18
19
19
error: unsafe block missing a safety comment
20
- --> $DIR/undocumented_unsafe_blocks.rs:271 :14
20
+ --> $DIR/undocumented_unsafe_blocks.rs:274 :14
21
21
|
22
22
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
23
23
| ^^^^^^^^^^^^^
24
24
|
25
25
= help: consider adding a safety comment on the preceding line
26
26
27
27
error: unsafe block missing a safety comment
28
- --> $DIR/undocumented_unsafe_blocks.rs:271 :29
28
+ --> $DIR/undocumented_unsafe_blocks.rs:274 :29
29
29
|
30
30
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
31
31
| ^^^^^^^^^^^^^
32
32
|
33
33
= help: consider adding a safety comment on the preceding line
34
34
35
35
error: unsafe block missing a safety comment
36
- --> $DIR/undocumented_unsafe_blocks.rs:271 :48
36
+ --> $DIR/undocumented_unsafe_blocks.rs:274 :48
37
37
|
38
38
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
39
39
| ^^^^^^^^^^^^^
40
40
|
41
41
= help: consider adding a safety comment on the preceding line
42
42
43
43
error: unsafe block missing a safety comment
44
- --> $DIR/undocumented_unsafe_blocks.rs:275 :18
44
+ --> $DIR/undocumented_unsafe_blocks.rs:278 :18
45
45
|
46
46
LL | let _ = (42, unsafe {}, "test", unsafe {});
47
47
| ^^^^^^^^^
48
48
|
49
49
= help: consider adding a safety comment on the preceding line
50
50
51
51
error: unsafe block missing a safety comment
52
- --> $DIR/undocumented_unsafe_blocks.rs:275 :37
52
+ --> $DIR/undocumented_unsafe_blocks.rs:278 :37
53
53
|
54
54
LL | let _ = (42, unsafe {}, "test", unsafe {});
55
55
| ^^^^^^^^^
56
56
|
57
57
= help: consider adding a safety comment on the preceding line
58
58
59
59
error: unsafe block missing a safety comment
60
- --> $DIR/undocumented_unsafe_blocks.rs:279 :14
60
+ --> $DIR/undocumented_unsafe_blocks.rs:282 :14
61
61
|
62
62
LL | let _ = *unsafe { &42 };
63
63
| ^^^^^^^^^^^^^^
64
64
|
65
65
= help: consider adding a safety comment on the preceding line
66
66
67
67
error: unsafe block missing a safety comment
68
- --> $DIR/undocumented_unsafe_blocks.rs:284 :19
68
+ --> $DIR/undocumented_unsafe_blocks.rs:287 :19
69
69
|
70
70
LL | let _ = match unsafe {} {
71
71
| ^^^^^^^^^
72
72
|
73
73
= help: consider adding a safety comment on the preceding line
74
74
75
75
error: unsafe block missing a safety comment
76
- --> $DIR/undocumented_unsafe_blocks.rs:290 :14
76
+ --> $DIR/undocumented_unsafe_blocks.rs:293 :14
77
77
|
78
78
LL | let _ = &unsafe {};
79
79
| ^^^^^^^^^
80
80
|
81
81
= help: consider adding a safety comment on the preceding line
82
82
83
83
error: unsafe block missing a safety comment
84
- --> $DIR/undocumented_unsafe_blocks.rs:294 :14
84
+ --> $DIR/undocumented_unsafe_blocks.rs:297 :14
85
85
|
86
86
LL | let _ = [unsafe {}; 5];
87
87
| ^^^^^^^^^
88
88
|
89
89
= help: consider adding a safety comment on the preceding line
90
90
91
91
error: unsafe block missing a safety comment
92
- --> $DIR/undocumented_unsafe_blocks.rs:298 :13
92
+ --> $DIR/undocumented_unsafe_blocks.rs:301 :13
93
93
|
94
94
LL | let _ = unsafe {};
95
95
| ^^^^^^^^^
96
96
|
97
97
= help: consider adding a safety comment on the preceding line
98
98
99
99
error: unsafe block missing a safety comment
100
- --> $DIR/undocumented_unsafe_blocks.rs:308 :8
100
+ --> $DIR/undocumented_unsafe_blocks.rs:311 :8
101
101
|
102
102
LL | t!(unsafe {});
103
103
| ^^^^^^^^^
104
104
|
105
105
= help: consider adding a safety comment on the preceding line
106
106
107
107
error: unsafe block missing a safety comment
108
- --> $DIR/undocumented_unsafe_blocks.rs:314 :13
108
+ --> $DIR/undocumented_unsafe_blocks.rs:317 :13
109
109
|
110
110
LL | unsafe {}
111
111
| ^^^^^^^^^
@@ -117,55 +117,55 @@ LL | t!();
117
117
= note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
118
118
119
119
error: unsafe block missing a safety comment
120
- --> $DIR/undocumented_unsafe_blocks.rs:322 :5
120
+ --> $DIR/undocumented_unsafe_blocks.rs:325 :5
121
121
|
122
122
LL | unsafe {} // SAFETY:
123
123
| ^^^^^^^^^
124
124
|
125
125
= help: consider adding a safety comment on the preceding line
126
126
127
127
error: unsafe block missing a safety comment
128
- --> $DIR/undocumented_unsafe_blocks.rs:326 :5
128
+ --> $DIR/undocumented_unsafe_blocks.rs:329 :5
129
129
|
130
130
LL | unsafe {
131
131
| ^^^^^^^^
132
132
|
133
133
= help: consider adding a safety comment on the preceding line
134
134
135
135
error: unsafe block missing a safety comment
136
- --> $DIR/undocumented_unsafe_blocks.rs:336 :5
136
+ --> $DIR/undocumented_unsafe_blocks.rs:339 :5
137
137
|
138
138
LL | unsafe {};
139
139
| ^^^^^^^^^
140
140
|
141
141
= help: consider adding a safety comment on the preceding line
142
142
143
143
error: unsafe block missing a safety comment
144
- --> $DIR/undocumented_unsafe_blocks.rs:340 :20
144
+ --> $DIR/undocumented_unsafe_blocks.rs:343 :20
145
145
|
146
146
LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
147
147
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148
148
|
149
149
= help: consider adding a safety comment on the preceding line
150
150
151
151
error: unsafe impl missing a safety comment
152
- --> $DIR/undocumented_unsafe_blocks.rs:347 :5
152
+ --> $DIR/undocumented_unsafe_blocks.rs:350 :5
153
153
|
154
154
LL | unsafe impl A for () {}
155
155
| ^^^^^^^^^^^^^^^^^^^^^^^
156
156
|
157
157
= help: consider adding a safety comment on the preceding line
158
158
159
159
error: unsafe impl missing a safety comment
160
- --> $DIR/undocumented_unsafe_blocks.rs:354 :9
160
+ --> $DIR/undocumented_unsafe_blocks.rs:357 :9
161
161
|
162
162
LL | unsafe impl B for (u32) {}
163
163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
164
164
|
165
165
= help: consider adding a safety comment on the preceding line
166
166
167
167
error: unsafe impl missing a safety comment
168
- --> $DIR/undocumented_unsafe_blocks.rs:375 :13
168
+ --> $DIR/undocumented_unsafe_blocks.rs:378 :13
169
169
|
170
170
LL | unsafe impl T for $t {}
171
171
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -177,7 +177,7 @@ LL | no_safety_comment!(());
177
177
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
178
178
179
179
error: unsafe impl missing a safety comment
180
- --> $DIR/undocumented_unsafe_blocks.rs:400 :13
180
+ --> $DIR/undocumented_unsafe_blocks.rs:403 :13
181
181
|
182
182
LL | unsafe impl T for $t {}
183
183
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -189,15 +189,15 @@ LL | no_safety_comment!(());
189
189
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
190
190
191
191
error: unsafe impl missing a safety comment
192
- --> $DIR/undocumented_unsafe_blocks.rs:408 :5
192
+ --> $DIR/undocumented_unsafe_blocks.rs:411 :5
193
193
|
194
194
LL | unsafe impl T for (i32) {}
195
195
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
196
196
|
197
197
= help: consider adding a safety comment on the preceding line
198
198
199
199
error: unsafe impl missing a safety comment
200
- --> $DIR/undocumented_unsafe_blocks.rs:400 :13
200
+ --> $DIR/undocumented_unsafe_blocks.rs:403 :13
201
201
|
202
202
LL | unsafe impl T for $t {}
203
203
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -209,77 +209,77 @@ LL | no_safety_comment!(u32);
209
209
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
210
210
211
211
error: unsafe impl missing a safety comment
212
- --> $DIR/undocumented_unsafe_blocks.rs:414 :5
212
+ --> $DIR/undocumented_unsafe_blocks.rs:417 :5
213
213
|
214
214
LL | unsafe impl T for (bool) {}
215
215
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
216
216
|
217
217
= help: consider adding a safety comment on the preceding line
218
218
219
219
error: unsafe impl missing a safety comment
220
- --> $DIR/undocumented_unsafe_blocks.rs:460 :5
220
+ --> $DIR/undocumented_unsafe_blocks.rs:463 :5
221
221
|
222
222
LL | unsafe impl NoComment for () {}
223
223
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224
224
|
225
225
= help: consider adding a safety comment on the preceding line
226
226
227
227
error: unsafe impl missing a safety comment
228
- --> $DIR/undocumented_unsafe_blocks.rs:464 :19
228
+ --> $DIR/undocumented_unsafe_blocks.rs:467 :19
229
229
|
230
230
LL | /* SAFETY: */ unsafe impl InlineComment for () {}
231
231
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232
232
|
233
233
= help: consider adding a safety comment on the preceding line
234
234
235
235
error: unsafe impl missing a safety comment
236
- --> $DIR/undocumented_unsafe_blocks.rs:468 :5
236
+ --> $DIR/undocumented_unsafe_blocks.rs:471 :5
237
237
|
238
238
LL | unsafe impl TrailingComment for () {} // SAFETY:
239
239
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240
240
|
241
241
= help: consider adding a safety comment on the preceding line
242
242
243
243
error: constant item has unnecessary safety comment
244
- --> $DIR/undocumented_unsafe_blocks.rs:472 :5
244
+ --> $DIR/undocumented_unsafe_blocks.rs:475 :5
245
245
|
246
246
LL | const BIG_NUMBER: i32 = 1000000;
247
247
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248
248
|
249
249
help: consider removing the safety comment
250
- --> $DIR/undocumented_unsafe_blocks.rs:471 :5
250
+ --> $DIR/undocumented_unsafe_blocks.rs:474 :5
251
251
|
252
252
LL | // SAFETY:
253
253
| ^^^^^^^^^^
254
254
= note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
255
255
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`
256
256
257
257
error: unsafe impl missing a safety comment
258
- --> $DIR/undocumented_unsafe_blocks.rs:473 :5
258
+ --> $DIR/undocumented_unsafe_blocks.rs:476 :5
259
259
|
260
260
LL | unsafe impl Interference for () {}
261
261
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262
262
|
263
263
= help: consider adding a safety comment on the preceding line
264
264
265
265
error: unsafe impl missing a safety comment
266
- --> $DIR/undocumented_unsafe_blocks.rs:480 :5
266
+ --> $DIR/undocumented_unsafe_blocks.rs:483 :5
267
267
|
268
268
LL | unsafe impl ImplInFn for () {}
269
269
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
270
270
|
271
271
= help: consider adding a safety comment on the preceding line
272
272
273
273
error: unsafe impl missing a safety comment
274
- --> $DIR/undocumented_unsafe_blocks.rs:489 :1
274
+ --> $DIR/undocumented_unsafe_blocks.rs:492 :1
275
275
|
276
276
LL | unsafe impl CrateRoot for () {}
277
277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278
278
|
279
279
= help: consider adding a safety comment on the preceding line
280
280
281
281
error: statement has unnecessary safety comment
282
- --> $DIR/undocumented_unsafe_blocks.rs:502 :5
282
+ --> $DIR/undocumented_unsafe_blocks.rs:505 :5
283
283
|
284
284
LL | / let _ = {
285
285
LL | | if unsafe { true } {
@@ -291,21 +291,21 @@ LL | | };
291
291
| |______^
292
292
|
293
293
help: consider removing the safety comment
294
- --> $DIR/undocumented_unsafe_blocks.rs:501 :5
294
+ --> $DIR/undocumented_unsafe_blocks.rs:504 :5
295
295
|
296
296
LL | // SAFETY: this is more than one level away, so it should warn
297
297
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298
298
299
299
error: unsafe block missing a safety comment
300
- --> $DIR/undocumented_unsafe_blocks.rs:503 :12
300
+ --> $DIR/undocumented_unsafe_blocks.rs:506 :12
301
301
|
302
302
LL | if unsafe { true } {
303
303
| ^^^^^^^^^^^^^^^
304
304
|
305
305
= help: consider adding a safety comment on the preceding line
306
306
307
307
error: unsafe block missing a safety comment
308
- --> $DIR/undocumented_unsafe_blocks.rs:506 :23
308
+ --> $DIR/undocumented_unsafe_blocks.rs:509 :23
309
309
|
310
310
LL | let bar = unsafe {};
311
311
| ^^^^^^^^^
0 commit comments