1
Fork 0

Add #[rustc_as_ptr] attribute

This commit is contained in:
gavincrawford 2024-11-02 11:39:29 -06:00
parent 145f9cf95d
commit 5f443df404
No known key found for this signature in database
GPG key ID: F4403D0C8297F254
3 changed files with 9 additions and 0 deletions

View file

@ -875,6 +875,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
lang, Normal, template!(NameValueStr: "name"), DuplicatesOk, EncodeCrossCrate::No, lang_items,
"lang items are subject to change",
),
rustc_attr!(
rustc_as_ptr, Normal, template!(Word), ErrorFollowing,
EncodeCrossCrate::Yes,
"#[rustc_as_ptr] is used to mark functions returning pointers to their inner allocations."
),
rustc_attr!(
rustc_pass_by_value, Normal, template!(Word), ErrorFollowing,
EncodeCrossCrate::Yes,