1
Fork 0

Rollup merge of #135046 - RalfJung:rustc_box_intrinsic, r=compiler-errors

turn rustc_box into an intrinsic

I am not entirely sure why this was made a special magic attribute, but an intrinsic seems like a more natural way to add magic expressions to the language.
This commit is contained in:
Jubilee 2025-01-04 07:57:33 -08:00 committed by GitHub
commit 7cf3b96a83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 198 additions and 208 deletions

View file

@ -933,11 +933,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
"#[rustc_has_incoherent_inherent_impls] allows the addition of incoherent inherent impls for \
the given type by annotating all impl items with #[rustc_allow_incoherent_impl]."
),
rustc_attr!(
rustc_box, AttributeType::Normal, template!(Word), ErrorFollowing, EncodeCrossCrate::No,
"#[rustc_box] allows creating boxes \
and it is only intended to be used in `alloc`."
),
BuiltinAttribute {
name: sym::rustc_diagnostic_item,