@@ -10,11 +10,11 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1010use rustc_data_structures:: stack:: ensure_sufficient_stack;
1111use rustc_errors:: ErrorGuaranteed ;
1212use rustc_hashes:: Hash128 ;
13- use rustc_hir as hir;
1413use rustc_hir:: attrs:: AttributeKind ;
1514use rustc_hir:: def:: { CtorOf , DefKind , Res } ;
1615use rustc_hir:: def_id:: { CrateNum , DefId , LocalDefId } ;
1716use rustc_hir:: limit:: Limit ;
17+ use rustc_hir:: { self as hir, find_attr} ;
1818use rustc_index:: bit_set:: GrowableBitSet ;
1919use rustc_macros:: { HashStable , TyDecodable , TyEncodable , extension} ;
2020use rustc_span:: sym;
@@ -1679,7 +1679,9 @@ pub fn is_doc_notable_trait(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
16791679/// the compiler to make some assumptions about its shape; if the user doesn't use a feature gate, they may
16801680/// cause an ICE that we otherwise may want to prevent.
16811681pub fn intrinsic_raw ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> Option < ty:: IntrinsicDef > {
1682- if tcx. features ( ) . intrinsics ( ) && tcx. has_attr ( def_id, sym:: rustc_intrinsic) {
1682+ if tcx. features ( ) . intrinsics ( )
1683+ && find_attr ! ( tcx. get_all_attrs( def_id) , AttributeKind :: RustcIntrinsic )
1684+ {
16831685 let must_be_overridden = match tcx. hir_node_by_def_id ( def_id) {
16841686 hir:: Node :: Item ( hir:: Item { kind : hir:: ItemKind :: Fn { has_body, .. } , .. } ) => {
16851687 !has_body
0 commit comments