@@ -599,7 +599,7 @@ impl UnsafeOpKind {
599
599
// FIXME: ideally we would want to trim the def paths, but this is not
600
600
// feasible with the current lint emission API (see issue #106126).
601
601
match self {
602
- CallToUnsafeFunction ( Some ( did) ) => tcx. emit_spanned_lint (
602
+ CallToUnsafeFunction ( Some ( did) ) => tcx. emit_node_span_lint (
603
603
UNSAFE_OP_IN_UNSAFE_FN ,
604
604
hir_id,
605
605
span,
@@ -609,7 +609,7 @@ impl UnsafeOpKind {
609
609
unsafe_not_inherited_note,
610
610
} ,
611
611
) ,
612
- CallToUnsafeFunction ( None ) => tcx. emit_spanned_lint (
612
+ CallToUnsafeFunction ( None ) => tcx. emit_node_span_lint (
613
613
UNSAFE_OP_IN_UNSAFE_FN ,
614
614
hir_id,
615
615
span,
@@ -618,7 +618,7 @@ impl UnsafeOpKind {
618
618
unsafe_not_inherited_note,
619
619
} ,
620
620
) ,
621
- UseOfInlineAssembly => tcx. emit_spanned_lint (
621
+ UseOfInlineAssembly => tcx. emit_node_span_lint (
622
622
UNSAFE_OP_IN_UNSAFE_FN ,
623
623
hir_id,
624
624
span,
@@ -627,7 +627,7 @@ impl UnsafeOpKind {
627
627
unsafe_not_inherited_note,
628
628
} ,
629
629
) ,
630
- InitializingTypeWith => tcx. emit_spanned_lint (
630
+ InitializingTypeWith => tcx. emit_node_span_lint (
631
631
UNSAFE_OP_IN_UNSAFE_FN ,
632
632
hir_id,
633
633
span,
@@ -636,7 +636,7 @@ impl UnsafeOpKind {
636
636
unsafe_not_inherited_note,
637
637
} ,
638
638
) ,
639
- UseOfMutableStatic => tcx. emit_spanned_lint (
639
+ UseOfMutableStatic => tcx. emit_node_span_lint (
640
640
UNSAFE_OP_IN_UNSAFE_FN ,
641
641
hir_id,
642
642
span,
@@ -645,7 +645,7 @@ impl UnsafeOpKind {
645
645
unsafe_not_inherited_note,
646
646
} ,
647
647
) ,
648
- UseOfExternStatic => tcx. emit_spanned_lint (
648
+ UseOfExternStatic => tcx. emit_node_span_lint (
649
649
UNSAFE_OP_IN_UNSAFE_FN ,
650
650
hir_id,
651
651
span,
@@ -654,7 +654,7 @@ impl UnsafeOpKind {
654
654
unsafe_not_inherited_note,
655
655
} ,
656
656
) ,
657
- DerefOfRawPointer => tcx. emit_spanned_lint (
657
+ DerefOfRawPointer => tcx. emit_node_span_lint (
658
658
UNSAFE_OP_IN_UNSAFE_FN ,
659
659
hir_id,
660
660
span,
@@ -663,7 +663,7 @@ impl UnsafeOpKind {
663
663
unsafe_not_inherited_note,
664
664
} ,
665
665
) ,
666
- AccessToUnionField => tcx. emit_spanned_lint (
666
+ AccessToUnionField => tcx. emit_node_span_lint (
667
667
UNSAFE_OP_IN_UNSAFE_FN ,
668
668
hir_id,
669
669
span,
@@ -672,7 +672,7 @@ impl UnsafeOpKind {
672
672
unsafe_not_inherited_note,
673
673
} ,
674
674
) ,
675
- MutationOfLayoutConstrainedField => tcx. emit_spanned_lint (
675
+ MutationOfLayoutConstrainedField => tcx. emit_node_span_lint (
676
676
UNSAFE_OP_IN_UNSAFE_FN ,
677
677
hir_id,
678
678
span,
@@ -681,7 +681,7 @@ impl UnsafeOpKind {
681
681
unsafe_not_inherited_note,
682
682
} ,
683
683
) ,
684
- BorrowOfLayoutConstrainedField => tcx. emit_spanned_lint (
684
+ BorrowOfLayoutConstrainedField => tcx. emit_node_span_lint (
685
685
UNSAFE_OP_IN_UNSAFE_FN ,
686
686
hir_id,
687
687
span,
@@ -690,7 +690,7 @@ impl UnsafeOpKind {
690
690
unsafe_not_inherited_note,
691
691
} ,
692
692
) ,
693
- CallToFunctionWith { function, missing, build_enabled } => tcx. emit_spanned_lint (
693
+ CallToFunctionWith { function, missing, build_enabled } => tcx. emit_node_span_lint (
694
694
UNSAFE_OP_IN_UNSAFE_FN ,
695
695
hir_id,
696
696
span,
@@ -941,7 +941,7 @@ pub fn check_unsafety(tcx: TyCtxt<'_>, def: LocalDefId) {
941
941
warnings. sort_by_key ( |w| w. block_span ) ;
942
942
for UnusedUnsafeWarning { hir_id, block_span, enclosing_unsafe } in warnings {
943
943
let block_span = tcx. sess . source_map ( ) . guess_head_span ( block_span) ;
944
- tcx. emit_spanned_lint (
944
+ tcx. emit_node_span_lint (
945
945
UNUSED_UNSAFE ,
946
946
hir_id,
947
947
block_span,
0 commit comments