1
Fork 0

Remove some depgraph edges on the HIR by invoking the intrinsic query instead of checking the attribute

This commit is contained in:
Oli Scherer 2024-02-22 14:47:35 +00:00
parent b3dcbc2931
commit bf5fc6e5d7
4 changed files with 5 additions and 6 deletions

View file

@ -16,7 +16,6 @@ use rustc_middle::ty::{self, SymbolName, TyCtxt};
use rustc_middle::ty::{GenericArgKind, GenericArgsRef};
use rustc_middle::util::Providers;
use rustc_session::config::{CrateType, OomStrategy};
use rustc_span::sym;
use rustc_target::spec::{SanitizerSet, TlsModel};
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
@ -82,7 +81,7 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap<S
return library.kind.is_statically_included().then_some(def_id);
}
if tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) {
if tcx.intrinsic(def_id).is_some_and(|i| i.must_be_overridden) {
return None;
}