diff options
| author | lcnr <rust@lcnr.de> | 2022-03-15 16:30:30 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-30 11:23:58 +0200 |
| commit | bef6f3e895beede5bfd5ba4bb12898615c156d59 (patch) | |
| tree | 724e0593725707bbff014409e6b495142830315b /compiler/rustc_feature | |
| parent | 4558a125b6108f3c080e88d7746e1d422b969bef (diff) | |
| download | rust-bef6f3e895beede5bfd5ba4bb12898615c156d59.tar.gz rust-bef6f3e895beede5bfd5ba4bb12898615c156d59.zip | |
rework implementation for inherent impls for builtin types
Diffstat (limited to 'compiler/rustc_feature')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index e2f0b413ff3..7c53f839a92 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -636,6 +636,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ template!(Word), ErrorFollowing, "#[rustc_pass_by_value] is used to mark types that must be passed by value instead of reference." ), + rustc_attr!( + rustc_coherence_is_core, AttributeType::CrateLevel, template!(Word), ErrorFollowing, + "#![rustc_coherence_is_core] allows inherent methods on builtin types, only intended to be used in `core`." + ), + rustc_attr!( + 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." + ), BuiltinAttribute { name: sym::rustc_diagnostic_item, type_: Normal, |
