Skip to content

Commit bc03f6e

Browse files
powerboat9P-E-P
authored andcommitted
Recognize rustc_args_required_const attribute
This doesn't handle rustc_args_required_const, but it does allow us to recognize it as a valid attribute. gcc/rust/ChangeLog: * util/rust-attribute-values.h (Attributes::RUSTC_ARGS_REQUIRED_CONST): New constexpr variable. * util/rust-attributes.cc (__definitions): New entry for RUSTC_ARGS_REQUIRED_CONST. Signed-off-by: Owen Avery <[email protected]>
1 parent bce5edb commit bc03f6e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ class Attributes
8989
static constexpr auto &TEST = "test";
9090

9191
static constexpr auto &SIMD_TEST = "simd_test";
92+
93+
static constexpr auto &RUSTC_ARGS_REQUIRED_CONST
94+
= "rustc_args_required_const";
9295
};
9396
} // namespace Values
9497
} // namespace Rust

gcc/rust/util/rust-attributes.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ static const BuiltinAttrDefinition __definitions[]
8888

8989
{Attrs::RUSTC_LAYOUT_SCALAR_VALID_RANGE_START, CODE_GENERATION},
9090

91+
// TODO: be careful about calling functions marked with this?
92+
{Attrs::RUSTC_ARGS_REQUIRED_CONST, CODE_GENERATION},
93+
9194
{Attrs::PRELUDE_IMPORT, NAME_RESOLUTION},
9295

9396
{Attrs::RUSTC_DIAGNOSTIC_ITEM, STATIC_ANALYSIS},

0 commit comments

Comments
 (0)