Skip to content

Commit df32148

Browse files
powerboat9philberty
authored andcommitted
Recognize rustc_allow_const_fn_unstable
This doesn't actually handle the attribute, although it does allow us to recognize it as valid. gcc/rust/ChangeLog: * util/rust-attribute-values.h (Attributes::RUSTC_ALLOW_CONST_FN_UNSTABLE): New static constexpr member variable. * util/rust-attributes.cc (__definitions): Add entry for RUSTC_ALLOW_CONST_FN_UNSTABLE. Signed-off-by: Owen Avery <[email protected]>
1 parent c0f7c2d commit df32148

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

gcc/rust/util/rust-attribute-values.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class Attributes
6060
static constexpr auto &RUSTC_PROMOTABLE = "rustc_promotable";
6161
static constexpr auto &RUSTC_CONST_STABLE = "rustc_const_stable";
6262
static constexpr auto &RUSTC_CONST_UNSTABLE = "rustc_const_unstable";
63+
static constexpr auto &RUSTC_ALLOW_CONST_FN_UNSTABLE
64+
= "rustc_allow_const_fn_unstable";
6365

6466
static constexpr auto &RUSTC_SPECIALIZATION_TRAIT
6567
= "rustc_specialization_trait";

gcc/rust/util/rust-attributes.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static const BuiltinAttrDefinition __definitions[]
103103
{Attrs::RUSTC_PROMOTABLE, CODE_GENERATION},
104104
{Attrs::RUSTC_CONST_STABLE, STATIC_ANALYSIS},
105105
{Attrs::RUSTC_CONST_UNSTABLE, STATIC_ANALYSIS},
106+
{Attrs::RUSTC_ALLOW_CONST_FN_UNSTABLE, STATIC_ANALYSIS},
106107
{Attrs::PRELUDE_IMPORT, NAME_RESOLUTION},
107108
{Attrs::TRACK_CALLER, CODE_GENERATION},
108109
{Attrs::RUSTC_SPECIALIZATION_TRAIT, TYPE_CHECK},

0 commit comments

Comments
 (0)