Skip to content

Commit

Permalink
attributes: Add #[derive] as a built-in attribute
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* util/rust-attribute-values.h: Declare new attribute value.
	* util/rust-attributes.cc: Use it.
  • Loading branch information
CohenArthur committed Jan 3, 2025
1 parent 2a03e7a commit d953618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions gcc/rust/util/rust-attribute-values.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Attributes
static constexpr auto &COLD = "cold";
static constexpr auto &CFG = "cfg";
static constexpr auto &CFG_ATTR = "cfg_attr";
static constexpr auto &DERIVE_ATTR = "derive";
static constexpr auto &DEPRECATED = "deprecated";
static constexpr auto &ALLOW = "allow";
static constexpr auto &ALLOW_INTERNAL_UNSTABLE = "allow_internal_unstable";
Expand Down
1 change: 1 addition & 0 deletions gcc/rust/util/rust-attributes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static const BuiltinAttrDefinition __definitions[]
{Attrs::COLD, CODE_GENERATION},
{Attrs::CFG, EXPANSION},
{Attrs::CFG_ATTR, EXPANSION},
{Attrs::DERIVE_ATTR, EXPANSION},
{Attrs::DEPRECATED, STATIC_ANALYSIS},
{Attrs::ALLOW, STATIC_ANALYSIS},
{Attrs::ALLOW_INTERNAL_UNSTABLE, STATIC_ANALYSIS},
Expand Down

0 comments on commit d953618

Please sign in to comment.