diff options
| author | DianQK <dianqk@dianqk.net> | 2024-08-19 06:26:52 +0800 |
|---|---|---|
| committer | DianQK <dianqk@dianqk.net> | 2024-08-19 06:26:52 +0800 |
| commit | 4508800d20006375fbd0b8f5b5fd41a6ad8d7ae4 (patch) | |
| tree | 671032058e27b7851bfaf1f2f016d5dac96f8330 /compiler/rustc_monomorphize | |
| parent | 334e509912d82323ff0fca016a2e69dbbee559fd (diff) | |
| download | rust-4508800d20006375fbd0b8f5b5fd41a6ad8d7ae4.tar.gz rust-4508800d20006375fbd0b8f5b5fd41a6ad8d7ae4.zip | |
Don't generate functions with the `rustc_intrinsic_must_be_overridden` attribute
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 0ae635f9b73..9f449868f03 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -888,7 +888,9 @@ fn visit_instance_use<'tcx>( if tcx.should_codegen_locally(panic_instance) { output.push(create_fn_mono_item(tcx, panic_instance, source)); } - } else if tcx.has_attr(def_id, sym::rustc_intrinsic) { + } else if tcx.has_attr(def_id, sym::rustc_intrinsic) + && !tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) + { // Codegen the fallback body of intrinsics with fallback bodies let instance = ty::Instance::new(def_id, instance.args); if tcx.should_codegen_locally(instance) { |
