From: Pierre-Emmanuel Patry <[email protected]>
Those attributes should be considered as builtin attributes but were
missing from the list of builtin attributes.
gcc/rust/ChangeLog:
* util/rust-attributes.cc: Add "feature", "no_core", "doc",
"crate_name", "crate_type" and "may_dandle" to the list of builtin
attributes.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
gcc/rust/util/rust-attributes.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index b3d60791432..719a972c9d1 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -96,6 +96,12 @@ static const BuiltinAttrDefinition __definitions[]
{Attrs::TARGET_FEATURE, CODE_GENERATION},
// From now on, these are reserved by the compiler and gated through
// #![feature(rustc_attrs)]
+ {Attrs::FEATURE, STATIC_ANALYSIS},
+ {Attrs::NO_CORE, CODE_GENERATION},
+ {Attrs::DOC, EXTERNAL},
+ {Attrs::CRATE_NAME, CODE_GENERATION},
+ {Attrs::CRATE_TYPE, CODE_GENERATION},
+ {Attrs::MAY_DANGLE, STATIC_ANALYSIS},
{Attrs::RUSTC_DEPRECATED, STATIC_ANALYSIS},
{Attrs::RUSTC_INHERIT_OVERFLOW_CHECKS, CODE_GENERATION},
{Attrs::STABLE, STATIC_ANALYSIS},
--
2.50.1