pub fn inherits_cfg(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool
Checks if the item of any of its parents has #[cfg(...)] attribute applied.
#[cfg(...)]