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

@@ -82,3 +82,10 @@ impl<S: Stage> NoArgsAttributeParser<S> for CoinductiveParser {
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Coinductive;
}
pub(crate) struct TypeConstParser;
impl<S: Stage> NoArgsAttributeParser<S> for TypeConstParser {
const PATH: &[Symbol] = &[sym::type_const];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::TypeConst;
}