generalize "incoherent impls" impl for custom types

This commit is contained in:
lcnr 2022-04-28 16:26:30 +02:00
parent 12d3f107c1
commit 209dd2cb0a
7 changed files with 85 additions and 18 deletions

View file

@ -644,6 +644,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
rustc_allow_incoherent_impl, AttributeType::Normal, template!(Word), ErrorFollowing,
"#[rustc_allow_incoherent_impl] has to be added to all impl items of an incoherent inherent impl."
),
rustc_attr!(
rustc_has_incoherent_inherent_impls, AttributeType::Normal, template!(Word), ErrorFollowing,
"#[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]."
),
BuiltinAttribute {
name: sym::rustc_diagnostic_item,
type_: Normal,