@@ -260,92 +260,32 @@ LL | unsafe impl Interference for () {}
260
260
|
261
261
= help: consider adding a safety comment on the preceding line
262
262
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
276
- --> $DIR/undocumented_unsafe_blocks.rs:479:5
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
263
error: unsafe impl missing a safety comment
324
- --> $DIR/undocumented_unsafe_blocks.rs:492 :5
264
+ --> $DIR/undocumented_unsafe_blocks.rs:479 :5
325
265
|
326
266
LL | unsafe impl ImplInFn for () {}
327
267
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
328
268
|
329
269
= help: consider adding a safety comment on the preceding line
330
270
331
271
error: unsafe impl missing a safety comment
332
- --> $DIR/undocumented_unsafe_blocks.rs:501 :1
272
+ --> $DIR/undocumented_unsafe_blocks.rs:488 :1
333
273
|
334
274
LL | unsafe impl CrateRoot for () {}
335
275
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
336
276
|
337
277
= help: consider adding a safety comment on the preceding line
338
278
339
279
error: unsafe block missing a safety comment
340
- --> $DIR/undocumented_unsafe_blocks.rs:511 :9
280
+ --> $DIR/undocumented_unsafe_blocks.rs:498 :9
341
281
|
342
282
LL | unsafe {};
343
283
| ^^^^^^^^^
344
284
|
345
285
= help: consider adding a safety comment on the preceding line
346
286
347
287
error: statement has unnecessary safety comment
348
- --> $DIR/undocumented_unsafe_blocks.rs:514 :5
288
+ --> $DIR/undocumented_unsafe_blocks.rs:501 :5
349
289
|
350
290
LL | / let _ = {
351
291
LL | | if unsafe { true } {
@@ -357,66 +297,26 @@ LL | | };
357
297
| |______^
358
298
|
359
299
help: consider removing the safety comment
360
- --> $DIR/undocumented_unsafe_blocks.rs:513 :5
300
+ --> $DIR/undocumented_unsafe_blocks.rs:500 :5
361
301
|
362
302
LL | // SAFETY: this is more than one level away, so it should warn
363
303
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
364
304
365
305
error: unsafe block missing a safety comment
366
- --> $DIR/undocumented_unsafe_blocks.rs:515 :12
306
+ --> $DIR/undocumented_unsafe_blocks.rs:502 :12
367
307
|
368
308
LL | if unsafe { true } {
369
309
| ^^^^^^^^^^^^^^^
370
310
|
371
311
= help: consider adding a safety comment on the preceding line
372
312
373
313
error: unsafe block missing a safety comment
374
- --> $DIR/undocumented_unsafe_blocks.rs:518 :23
314
+ --> $DIR/undocumented_unsafe_blocks.rs:505 :23
375
315
|
376
316
LL | let bar = unsafe {};
377
317
| ^^^^^^^^^
378
318
|
379
319
= help: consider adding a safety comment on the preceding line
380
320
381
- error: impl has unnecessary safety comment
382
- --> $DIR/undocumented_unsafe_blocks.rs:541:13
383
- |
384
- LL | impl T for $t {}
385
- | ^^^^^^^^^^^^^^^^
386
- ...
387
- LL | with_safety_comment!(i32);
388
- | ------------------------- in this macro invocation
389
- |
390
- help: consider removing the safety comment
391
- --> $DIR/undocumented_unsafe_blocks.rs:540:13
392
- |
393
- LL | // Safety: unnecessary
394
- | ^^^^^^^^^^^^^^^^^^^^^^
395
- = note: this error originates in the macro `with_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
396
-
397
- error: expression has unnecessary safety comment
398
- --> $DIR/undocumented_unsafe_blocks.rs:553:5
399
- |
400
- LL | 24
401
- | ^^
402
- |
403
- help: consider removing the safety comment
404
- --> $DIR/undocumented_unsafe_blocks.rs:552:5
405
- |
406
- LL | // SAFETY: unnecessary
407
- | ^^^^^^^^^^^^^^^^^^^^^^
408
-
409
- error: statement has unnecessary safety comment
410
- --> $DIR/undocumented_unsafe_blocks.rs:550:5
411
- |
412
- LL | let num = 42;
413
- | ^^^^^^^^^^^^^
414
- |
415
- help: consider removing the safety comment
416
- --> $DIR/undocumented_unsafe_blocks.rs:549:5
417
- |
418
- LL | // SAFETY: unnecessary
419
- | ^^^^^^^^^^^^^^^^^^^^^^
420
-
421
- error: aborting due to 44 previous errors
321
+ error: aborting due to 36 previous errors
422
322
0 commit comments