Skip to content

Commit c7b79d8

Browse files
committed
Cleanup
1 parent 25540ae commit c7b79d8

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

clippy_lints/src/undocumented_unsafe_blocks.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ fn block_has_safety_comment(cx: &LateContext<'_>, span: Span, accept_comment_abo
457457
) || span_has_safety_comment(cx, span, accept_comment_above_attributes)
458458
}
459459

460-
#[derive(Debug)]
461460
enum HasSafetyComment {
462461
Yes(BytePos),
463462
No,

tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -355,73 +355,73 @@ LL | // SAFETY: fail ONLY if `accept-comment-above-attribute = false`
355355
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
356356

357357
error: statement has unnecessary safety comment
358-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:720:5
358+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:721:5
359359
|
360360
LL | _ = bar();
361361
| ^^^^^^^^^^
362362
|
363363
help: consider removing the safety comment
364-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:719:5
364+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:720:5
365365
|
366366
LL | // SAFETY: unnecessary_safety_comment triggers here
367367
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
368368

369369
error: module has unnecessary safety comment
370-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:740:5
370+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:741:5
371371
|
372372
LL | mod x {}
373373
| ^^^^^^^^
374374
|
375375
help: consider removing the safety comment
376-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:739:5
376+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:740:5
377377
|
378378
LL | // SAFETY: ...
379379
| ^^^^^^^^^^^^^^
380380

381381
error: module has unnecessary safety comment
382-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:745:5
382+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:746:5
383383
|
384384
LL | mod y {}
385385
| ^^^^^^^^
386386
|
387387
help: consider removing the safety comment
388-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:743:5
388+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:744:5
389389
|
390390
LL | // SAFETY: ...
391391
| ^^^^^^^^^^^^^^
392392

393393
error: module has unnecessary safety comment
394-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:750:5
394+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:751:5
395395
|
396396
LL | mod z {}
397397
| ^^^^^^^^
398398
|
399399
help: consider removing the safety comment
400-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:749:5
400+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:750:5
401401
|
402402
LL | // SAFETY: ...
403403
| ^^^^^^^^^^^^^^
404404

405405
error: module has unnecessary safety comment
406-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:758:5
406+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:759:5
407407
|
408408
LL | mod y {}
409409
| ^^^^^^^^
410410
|
411411
help: consider removing the safety comment
412-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:756:5
412+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:757:5
413413
|
414414
LL | // SAFETY: ...
415415
| ^^^^^^^^^^^^^^
416416

417417
error: statement has unnecessary safety comment
418-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:773:9
418+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:774:9
419419
|
420420
LL | let x = 34;
421421
| ^^^^^^^^^^^
422422
|
423423
help: consider removing the safety comment
424-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:771:9
424+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:772:9
425425
|
426426
LL | // SAFETY: ...
427427
| ^^^^^^^^^^^^^^

tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,51 +439,51 @@ LL | unsafe { Date::__from_ordinal_date_unchecked(1970, 1) }.into_julian
439439
= help: consider adding a safety comment on the preceding line
440440

441441
error: statement has unnecessary safety comment
442-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:720:5
442+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:721:5
443443
|
444444
LL | _ = bar();
445445
| ^^^^^^^^^^
446446
|
447447
help: consider removing the safety comment
448-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:719:5
448+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:720:5
449449
|
450450
LL | // SAFETY: unnecessary_safety_comment triggers here
451451
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452452

453453
error: unsafe block missing a safety comment
454-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:734:12
454+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:735:12
455455
|
456456
LL | return unsafe { h() };
457457
| ^^^^^^^^^^^^^^
458458
|
459459
= help: consider adding a safety comment on the preceding line
460460

461461
error: module has unnecessary safety comment
462-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:740:5
462+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:741:5
463463
|
464464
LL | mod x {}
465465
| ^^^^^^^^
466466
|
467467
help: consider removing the safety comment
468-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:739:5
468+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:740:5
469469
|
470470
LL | // SAFETY: ...
471471
| ^^^^^^^^^^^^^^
472472

473473
error: module has unnecessary safety comment
474-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:750:5
474+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:751:5
475475
|
476476
LL | mod z {}
477477
| ^^^^^^^^
478478
|
479479
help: consider removing the safety comment
480-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:749:5
480+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:750:5
481481
|
482482
LL | // SAFETY: ...
483483
| ^^^^^^^^^^^^^^
484484

485485
error: unsafe block missing a safety comment
486-
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:765:9
486+
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:766:9
487487
|
488488
LL | unsafe {}
489489
| ^^^^^^^^^

tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,8 @@ mod issue_11709_regression {
701701
const UNIX_EPOCH_JULIAN_DAY: i32 =
702702
unsafe { Date::__from_ordinal_date_unchecked(1970, 1) }.into_julian_day_just_make_this_line_longer();
703703
//~[disabled]^ undocumented_unsafe_blocks
704-
//~[default]^^^ unnecessary_safety_comment
704+
// This shouldn't be linted, Issue #15755
705+
//~[default]^^^^ unnecessary_safety_comment
705706
}
706707

707708
fn issue_13039() {

0 commit comments

Comments
 (0)