Skip to content

Commit 00cb5cb

Browse files
committed
Remove more spans from AttributeKind
1 parent 69f7046 commit 00cb5cb

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

clippy_lints/src/format_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ impl<'tcx> FormatArgsExpr<'_, 'tcx> {
716716
};
717717
let selection = SelectionContext::new(&infcx).select(&obligation);
718718
let derived = if let Ok(Some(Selection::UserDefined(data))) = selection {
719-
find_attr!(tcx, data.impl_def_id, AutomaticallyDerived(..))
719+
find_attr!(tcx, data.impl_def_id, AutomaticallyDerived)
720720
} else {
721721
false
722722
};

clippy_utils/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,8 +1736,9 @@ pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool {
17361736
.filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_))))
17371737
.any(|(id, _)| {
17381738
find_attr!(
1739-
tcx.hir_attrs(tcx.local_def_id_to_hir_id(id.def_id)),
1740-
AutomaticallyDerived(..)
1739+
tcx,
1740+
id.def_id,
1741+
AutomaticallyDerived
17411742
)
17421743
})
17431744
}
@@ -2101,11 +2102,11 @@ pub fn std_or_core(cx: &LateContext<'_>) -> Option<&'static str> {
21012102
}
21022103

21032104
pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool {
2104-
find_attr!(cx.tcx, crate, NoStd(..))
2105+
find_attr!(cx.tcx, crate, NoStd)
21052106
}
21062107

21072108
pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool {
2108-
find_attr!(cx.tcx, crate, NoCore(..))
2109+
find_attr!(cx.tcx, crate, NoCore)
21092110
}
21102111

21112112
/// Check if parent of a hir node is a trait implementation block.

0 commit comments

Comments
 (0)