about summary refs log tree commit diff
path: root/compiler/rustc_feature
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-20 17:16:34 +0000
committerbors <bors@rust-lang.org>2025-08-20 17:16:34 +0000
commit040a98af70f0a7da03f3d5356531b28a2a7a77e4 (patch)
tree85c77e585d40a6871b8f9552234f5c784dfca8f0 /compiler/rustc_feature
parente8a792daf500b5ff8097896ddb6cc037abe92487 (diff)
parent8ea3b093819aabd92a605b42989341da0c97c0d6 (diff)
downloadrust-040a98af70f0a7da03f3d5356531b28a2a7a77e4.tar.gz
rust-040a98af70f0a7da03f3d5356531b28a2a7a77e4.zip
Auto merge of #144086 - clubby789:alloc-zeroed, r=nikic
Pass `alloc-variant-zeroed` to LLVM

Makes use of https://github.com/llvm/llvm-project/pull/138299 (once we pull in a version of LLVM with this attribute). ~~Unfortunately also requires https://github.com/llvm/llvm-project/pull/149336 to work.~~

Closes rust-lang/rust#104847
Diffstat (limited to 'compiler/rustc_feature')
-rw-r--r--compiler/rustc_feature/src/builtin_attrs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs
index 3b11a2bc7df..8f632bcebc7 100644
--- a/compiler/rustc_feature/src/builtin_attrs.rs
+++ b/compiler/rustc_feature/src/builtin_attrs.rs
@@ -996,6 +996,10 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
         rustc_allocator_zeroed, Normal, template!(Word), WarnFollowing,
         EncodeCrossCrate::No,
     ),
+    rustc_attr!(
+        rustc_allocator_zeroed_variant, Normal, template!(NameValueStr: "function"), ErrorPreceding,
+        EncodeCrossCrate::Yes,
+    ),
     gated!(
         default_lib_allocator, Normal, template!(Word), WarnFollowing,
         EncodeCrossCrate::No, allocator_internals, experimental!(default_lib_allocator),