add #[align] attribute

Right now it's used for functions with `fn_align`, in the future it will
get more uses (statics, struct fields, etc.)
This commit is contained in:
Folkert de Vries
2025-06-09 20:08:52 +02:00
parent 1bb335244c
commit 1fdf2b5620
30 changed files with 322 additions and 135 deletions

View File

@@ -182,6 +182,9 @@ impl Deprecation {
#[derive(Clone, Debug, HashStable_Generic, Encodable, Decodable, PrintAttribute)]
pub enum AttributeKind {
// tidy-alphabetical-start
/// Represents `#[align(N)]`.
Align { align: Align, span: Span },
/// Represents `#[rustc_allow_const_fn_unstable]`.
AllowConstFnUnstable(ThinVec<Symbol>),