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]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.
Commit on github:
https://github.com/Rust-GCC/gccrs/commit/0b6509d1349e1e17d2ff2f870ab5106fc2417350
The commit has been mentioned in the following pull-request(s):
- https://github.com/Rust-GCC/gccrs/pull/4425
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 b3d607914..719a972c9 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.53.0