Remove AttributeDuplicates from BUILTIN_ATTRIBUTES

This commit is contained in:
Jonathan Brouwer
2026-04-12 21:21:56 +02:00
parent 0e4b612119
commit 1e793cdad3
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ fn check_fn(
def_id: LocalDefId,
) {
#[allow(deprecated)]
if !cx.tcx.has_attr(def_id, sym::test) {
if !cx.tcx.get_attrs(def_id, sym::test).next().is_some() {
let expr = if kind.asyncness().is_async() {
match get_async_fn_body(cx.tcx, body) {
Some(b) => b,
+1 -2
View File
@@ -2400,8 +2400,7 @@ pub fn is_hir_ty_cfg_dependant(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> bool {
if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind
&& let Res::Def(_, def_id) = path.res
{
#[allow(deprecated)]
return cx.tcx.has_attr(def_id, sym::cfg) || cx.tcx.has_attr(def_id, sym::cfg_attr);
return find_attr!(cx.tcx, def_id, CfgTrace(..) | CfgAttrTrace);
}
false
}