Port #[rustc_allow_incoherent_impl] to the new attribute system

This commit is contained in:
Pavel Grigorenko
2025-06-24 23:53:39 +03:00
parent a6bc8160d6
commit e9e64954e6
7 changed files with 31 additions and 10 deletions

View File

@@ -125,6 +125,13 @@ impl<S: Stage> NoArgsAttributeParser<S> for CoinductiveParser {
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Coinductive;
}
pub(crate) struct AllowIncoherentImplParser;
impl<S: Stage> NoArgsAttributeParser<S> for AllowIncoherentImplParser {
const PATH: &[Symbol] = &[sym::rustc_allow_incoherent_impl];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const CREATE: fn(Span) -> AttributeKind = AttributeKind::AllowIncoherentImpl;
}
pub(crate) struct FundamentalParser;
impl<S: Stage> NoArgsAttributeParser<S> for FundamentalParser {
const PATH: &[Symbol] = &[sym::fundamental];