mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Remove AttributeDuplicates from BUILTIN_ATTRIBUTES
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user