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

@ -1019,6 +1019,11 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>) ->
return false;
}
if tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) {
// These are implemented by backends directly and have no meaningful body.
return false;
}
if def_id.is_local() {
// Local items cannot be referred to locally without monomorphizing them locally.
return true;