Port #[type_const] to the new attribute system

This commit is contained in:
Pavel Grigorenko
2025-06-24 00:51:16 +03:00
parent 6f8e92d5aa
commit 813ec60744
9 changed files with 42 additions and 21 deletions

View File

@@ -359,6 +359,9 @@ pub enum AttributeKind {
/// Represents `#[track_caller]`
TrackCaller(Span),
/// Represents `#[type_const]`.
TypeConst(Span),
/// Represents `#[used]`
Used { used_by: UsedBy, span: Span },
// tidy-alphabetical-end

View File

@@ -59,6 +59,7 @@ impl AttributeKind {
StdInternalSymbol(..) => No,
TargetFeature(..) => No,
TrackCaller(..) => Yes,
TypeConst(..) => Yes,
Used { .. } => No,
// tidy-alphabetical-end
}