From 3660a4e97259a23b9a24c30aa097932ae6f0eb18 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 4 Jul 2021 23:50:34 +0800 Subject: Applied suggestions --- compiler/rustc_feature/src/builtin_attrs.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_feature/src') diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index dbdc14dced8..24a5a007ded 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -349,6 +349,12 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ), gated!(cmse_nonsecure_entry, AssumedUsed, template!(Word), experimental!(cmse_nonsecure_entry)), + // RFC 2632 + gated!( + default_method_body_is_const, AssumedUsed, template!(Word), const_trait_impl, + "`default_method_body_is_const` is a temporary placeholder for declaring default bodies \ + as `const`, which may be removed or renamed in the future." + ), // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: @@ -470,11 +476,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_attr!(rustc_promotable, AssumedUsed, template!(Word), IMPL_DETAIL), rustc_attr!(rustc_legacy_const_generics, AssumedUsed, template!(List: "N"), INTERNAL_UNSTABLE), - gated!( - default_method_body_is_const, AssumedUsed, template!(Word), const_trait_impl, - "the `#[default_method_body_is_const]` attribute marks a default method of a trait \ - as const, so it does not need to be duplicated by a const impl." - ), // ========================================================================== // Internal attributes, Layout related: -- cgit 1.4.1-3-g733a5