Skip to content

Commit

Permalink
use Lrc instead of the aliased type Arc directly
Browse files Browse the repository at this point in the history
  • Loading branch information
y21 committed Apr 4, 2024
1 parent 0ae4a04 commit 71e02a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/attrs/mixed_attributes_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use super::MIXED_ATTRIBUTES_STYLE;
use clippy_utils::diagnostics::span_lint;
use rustc_ast::{AttrKind, AttrStyle, Attribute};
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::Lrc;
use rustc_lint::{LateContext, LintContext};
use rustc_span::source_map::SourceMap;
use rustc_span::{SourceFile, Span, Symbol};
use std::sync::Arc;

#[derive(Hash, PartialEq, Eq)]
enum SimpleAttrKind {
Expand Down Expand Up @@ -79,7 +79,7 @@ fn lint_mixed_attrs(cx: &LateContext<'_>, attrs: &[Attribute]) {
);
}

fn attr_in_same_src_as_item(source_map: &SourceMap, item_src: &Arc<SourceFile>, attr_span: Span) -> bool {
fn attr_in_same_src_as_item(source_map: &SourceMap, item_src: &Lrc<SourceFile>, attr_span: Span) -> bool {
let attr_src = source_map.lookup_source_file(attr_span.lo());
Arc::ptr_eq(item_src, &attr_src)
Lrc::ptr_eq(item_src, &attr_src)
}

0 comments on commit 71e02a0

Please sign in to comment.