1
Fork 0

Add a scheme for moving away from extern "rust-intrinsic" entirely

This commit is contained in:
Oli Scherer 2024-02-19 17:35:12 +00:00
parent f2612daf58
commit 1e57df1969
16 changed files with 131 additions and 8 deletions

View file

@ -23,6 +23,10 @@ fn cross_crate_inlinable(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
return false;
}
if tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) {
return false;
}
// This just reproduces the logic from Instance::requires_inline.
match tcx.def_kind(def_id) {
DefKind::Ctor(..) | DefKind::Closure => return true,