]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add multiple missing builtin attribute values
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 10 Feb 2026 12:57:42 +0000 (13:57 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 20 Mar 2026 17:10:37 +0000 (18:10 +0100)
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 <pierre-emmanuel.patry@embecosm.com>
gcc/rust/util/rust-attributes.cc

index b3d60791432be7f71a67fdda37fc6af1d0e90167..719a972c9d1bacf40c4e9287f2b15f42faaa6026 100644 (file)
@@ -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},