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