about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-19 17:35:12 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-03-04 16:13:50 +0000
commit1e57df19697fd4f7f1e9dfd24ccfb00051c25bda (patch)
treef0730d02b56b2eb8d180b1845f8e0a88557b3938 /compiler/rustc_monomorphize
parentf2612daf58bfa2d747ddae02243a6ec1d6528992 (diff)
downloadrust-1e57df19697fd4f7f1e9dfd24ccfb00051c25bda.tar.gz
rust-1e57df19697fd4f7f1e9dfd24ccfb00051c25bda.zip
Add a scheme for moving away from `extern "rust-intrinsic"` entirely
Diffstat (limited to 'compiler/rustc_monomorphize')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs
index 5593de60784..b3a28b546d3 100644
--- a/compiler/rustc_monomorphize/src/collector.rs
+++ b/compiler/rustc_monomorphize/src/collector.rs
@@ -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;