diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2021-07-04 12:24:20 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2021-07-10 20:54:44 +0800 |
| commit | 2db927d8d82260759e4aaa183dbebd0adbb00177 (patch) | |
| tree | 04bbc46ca5e71ad46526c929b471e00aeb431321 /compiler/rustc_feature/src | |
| parent | a84d1b21aea9863f0fc5f436b4982d145dade646 (diff) | |
| download | rust-2db927d8d82260759e4aaa183dbebd0adbb00177.tar.gz rust-2db927d8d82260759e4aaa183dbebd0adbb00177.zip | |
Add #[default_method_body_is_const]
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 259a6328a22..dbdc14dced8 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -470,6 +470,11 @@ 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: |
