@@ -260,45 +260,105 @@ LL | unsafe impl Interference for () {}
260
260
|
261
261
= help: consider adding a safety comment on the preceding line
262
262
263
- error: unsafe impl missing a safety comment
263
+ error: constant item has unnecessary safety comment
264
+ --> $DIR/undocumented_unsafe_blocks.rs:477:5
265
+ |
266
+ LL | const CONST: u32 = 0;
267
+ | ^^^^^^^^^^^^^^^^^^^^^
268
+ |
269
+ help: consider removing the safety comment
270
+ --> $DIR/undocumented_unsafe_blocks.rs:476:5
271
+ |
272
+ LL | // SAFETY:
273
+ | ^^^^^^^^^^
274
+
275
+ error: static item has unnecessary safety comment
264
276
--> $DIR/undocumented_unsafe_blocks.rs:479:5
265
277
|
278
+ LL | static STATIC: u32 = 0;
279
+ | ^^^^^^^^^^^^^^^^^^^^^^^
280
+ |
281
+ help: consider removing the safety comment
282
+ --> $DIR/undocumented_unsafe_blocks.rs:478:5
283
+ |
284
+ LL | // SAFETY:
285
+ | ^^^^^^^^^^
286
+
287
+ error: struct has unnecessary safety comment
288
+ --> $DIR/undocumented_unsafe_blocks.rs:481:5
289
+ |
290
+ LL | struct Struct;
291
+ | ^^^^^^^^^^^^^^
292
+ |
293
+ help: consider removing the safety comment
294
+ --> $DIR/undocumented_unsafe_blocks.rs:480:5
295
+ |
296
+ LL | // SAFETY:
297
+ | ^^^^^^^^^^
298
+
299
+ error: enum has unnecessary safety comment
300
+ --> $DIR/undocumented_unsafe_blocks.rs:483:5
301
+ |
302
+ LL | enum Enum {}
303
+ | ^^^^^^^^^^^^
304
+ |
305
+ help: consider removing the safety comment
306
+ --> $DIR/undocumented_unsafe_blocks.rs:482:5
307
+ |
308
+ LL | // SAFETY:
309
+ | ^^^^^^^^^^
310
+
311
+ error: module has unnecessary safety comment
312
+ --> $DIR/undocumented_unsafe_blocks.rs:485:5
313
+ |
314
+ LL | mod module {}
315
+ | ^^^^^^^^^^^^^
316
+ |
317
+ help: consider removing the safety comment
318
+ --> $DIR/undocumented_unsafe_blocks.rs:484:5
319
+ |
320
+ LL | // SAFETY:
321
+ | ^^^^^^^^^^
322
+
323
+ error: unsafe impl missing a safety comment
324
+ --> $DIR/undocumented_unsafe_blocks.rs:492:5
325
+ |
266
326
LL | unsafe impl ImplInFn for () {}
267
327
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
268
328
|
269
329
= help: consider adding a safety comment on the preceding line
270
330
271
331
error: unsafe impl missing a safety comment
272
- --> $DIR/undocumented_unsafe_blocks.rs:488 :1
332
+ --> $DIR/undocumented_unsafe_blocks.rs:501 :1
273
333
|
274
334
LL | unsafe impl CrateRoot for () {}
275
335
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276
336
|
277
337
= help: consider adding a safety comment on the preceding line
278
338
279
339
error: unsafe block missing a safety comment
280
- --> $DIR/undocumented_unsafe_blocks.rs:498 :9
340
+ --> $DIR/undocumented_unsafe_blocks.rs:511 :9
281
341
|
282
342
LL | unsafe {};
283
343
| ^^^^^^^^^
284
344
|
285
345
= help: consider adding a safety comment on the preceding line
286
346
287
347
error: unsafe block missing a safety comment
288
- --> $DIR/undocumented_unsafe_blocks.rs:502 :12
348
+ --> $DIR/undocumented_unsafe_blocks.rs:515 :12
289
349
|
290
350
LL | if unsafe { true } {
291
351
| ^^^^^^^^^^^^^^^
292
352
|
293
353
= help: consider adding a safety comment on the preceding line
294
354
295
355
error: unsafe block missing a safety comment
296
- --> $DIR/undocumented_unsafe_blocks.rs:505 :23
356
+ --> $DIR/undocumented_unsafe_blocks.rs:518 :23
297
357
|
298
358
LL | let bar = unsafe {};
299
359
| ^^^^^^^^^
300
360
|
301
361
= help: consider adding a safety comment on the preceding line
302
362
303
- error: aborting due to 35 previous errors
363
+ error: aborting due to 40 previous errors
304
364
0 commit comments