about summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-07-04 23:50:34 +0800
committerDeadbeef <ent3rm4n@gmail.com>2021-07-10 20:54:47 +0800
commit3660a4e97259a23b9a24c30aa097932ae6f0eb18 (patch)
treed740a6fdc515c949256ab1798ad06bb0f322b387 /compiler/rustc_feature/src
parent2db927d8d82260759e4aaa183dbebd0adbb00177 (diff)
downloadrust-3660a4e97259a23b9a24c30aa097932ae6f0eb18.tar.gz
rust-3660a4e97259a23b9a24c30aa097932ae6f0eb18.zip
Applied suggestions
Diffstat (limited to 'compiler/rustc_feature/src')
-rw-r--r--compiler/rustc_feature/src/builtin_attrs.rs11
1 files changed, 6 insertions, 5 deletions
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: