]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: attributes: Add #[test] and #[simd_test]
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 4 Jul 2025 14:19:44 +0000 (16:19 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:55 +0000 (16:36 +0200)
gcc/rust/ChangeLog:

* util/rust-attribute-values.h: Add declarations for them.
* util/rust-attributes.cc: Add definitions.

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

index 47e6a175396cf2deeef4d47549157558e7428720..09ef566479531ff645bbadda51e20b129a7cccc0 100644 (file)
@@ -85,6 +85,10 @@ public:
   static constexpr auto &NON_EXHAUSTIVE = "non_exhaustive";
 
   static constexpr auto &RUSTFMT = "rustfmt";
+
+  static constexpr auto &TEST = "test";
+
+  static constexpr auto &SIMD_TEST = "simd_test";
 };
 } // namespace Values
 } // namespace Rust
index 9bf4f7773c68b81b83324f1f10101e39a4f2e399..0c957fb201440ffe61d9c4dd51c7defd3297ca59 100644 (file)
@@ -95,7 +95,10 @@ static const BuiltinAttrDefinition __definitions[]
 
      {Attrs::FUNDAMENTAL, TYPE_CHECK},
      {Attrs::NON_EXHAUSTIVE, TYPE_CHECK},
-     {Attrs::RUSTFMT, EXTERNAL}};
+     {Attrs::RUSTFMT, EXTERNAL},
+
+     {Attrs::TEST, CODE_GENERATION},
+     {Attrs::SIMD_TEST, CODE_GENERATION}};
 
 BuiltinAttributeMappings *
 BuiltinAttributeMappings::get ()