1+ use std:: sync:: Arc ;
12use std:: ops:: ControlFlow ;
23
34use clippy_config:: Conf ;
@@ -6,7 +7,6 @@ use clippy_utils::is_lint_allowed;
67use clippy_utils:: source:: walk_span_to_context;
78use clippy_utils:: visitors:: { Descend , for_each_expr} ;
89use hir:: HirId ;
9- use rustc_data_structures:: sync:: Lrc ;
1010use rustc_hir as hir;
1111use rustc_hir:: { Block , BlockCheckMode , ItemKind , Node , UnsafeSource } ;
1212use rustc_lexer:: { TokenKind , tokenize} ;
@@ -480,7 +480,7 @@ fn item_has_safety_comment(cx: &LateContext<'_>, item: &hir::Item<'_>) -> HasSaf
480480 if let Some ( comment_start) = comment_start
481481 && let Ok ( unsafe_line) = source_map. lookup_line ( item. span . lo ( ) )
482482 && let Ok ( comment_start_line) = source_map. lookup_line ( comment_start)
483- && Lrc :: ptr_eq ( & unsafe_line. sf , & comment_start_line. sf )
483+ && Arc :: ptr_eq ( & unsafe_line. sf , & comment_start_line. sf )
484484 && let Some ( src) = unsafe_line. sf . src . as_deref ( )
485485 {
486486 return if comment_start_line. line >= unsafe_line. line {
@@ -520,7 +520,7 @@ fn stmt_has_safety_comment(cx: &LateContext<'_>, span: Span, hir_id: HirId) -> H
520520 if let Some ( comment_start) = comment_start
521521 && let Ok ( unsafe_line) = source_map. lookup_line ( span. lo ( ) )
522522 && let Ok ( comment_start_line) = source_map. lookup_line ( comment_start)
523- && Lrc :: ptr_eq ( & unsafe_line. sf , & comment_start_line. sf )
523+ && Arc :: ptr_eq ( & unsafe_line. sf , & comment_start_line. sf )
524524 && let Some ( src) = unsafe_line. sf . src . as_deref ( )
525525 {
526526 return if comment_start_line. line >= unsafe_line. line {
@@ -580,7 +580,7 @@ fn span_from_macro_expansion_has_safety_comment(cx: &LateContext<'_>, span: Span
580580 // ^--------------------------------------------^
581581 if let Ok ( unsafe_line) = source_map. lookup_line ( span. lo ( ) )
582582 && let Ok ( macro_line) = source_map. lookup_line ( ctxt. outer_expn_data ( ) . def_site . lo ( ) )
583- && Lrc :: ptr_eq ( & unsafe_line. sf , & macro_line. sf )
583+ && Arc :: ptr_eq ( & unsafe_line. sf , & macro_line. sf )
584584 && let Some ( src) = unsafe_line. sf . src . as_deref ( )
585585 {
586586 if macro_line. line < unsafe_line. line {
@@ -641,7 +641,7 @@ fn span_has_safety_comment(cx: &LateContext<'_>, span: Span) -> bool {
641641 if let Ok ( unsafe_line) = source_map. lookup_line ( span. lo ( ) )
642642 && let Some ( body_span) = walk_span_to_context ( search_span, SyntaxContext :: root ( ) )
643643 && let Ok ( body_line) = source_map. lookup_line ( body_span. lo ( ) )
644- && Lrc :: ptr_eq ( & unsafe_line. sf , & body_line. sf )
644+ && Arc :: ptr_eq ( & unsafe_line. sf , & body_line. sf )
645645 && let Some ( src) = unsafe_line. sf . src . as_deref ( )
646646 {
647647 // Get the text from the start of function body to the unsafe block.
0 commit comments