Skip to content

Commit 0e0ecc0

Browse files
CohenArthurphilberty
authored andcommitted
attributes: Add #[test] and #[simd_test]
gcc/rust/ChangeLog: * util/rust-attribute-values.h: Add declarations for them. * util/rust-attributes.cc: Add definitions.
1 parent 110783a commit 0e0ecc0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ class Attributes
8585
static constexpr auto &NON_EXHAUSTIVE = "non_exhaustive";
8686

8787
static constexpr auto &RUSTFMT = "rustfmt";
88+
89+
static constexpr auto &TEST = "test";
90+
91+
static constexpr auto &SIMD_TEST = "simd_test";
8892
};
8993
} // namespace Values
9094
} // namespace Rust

gcc/rust/util/rust-attributes.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ static const BuiltinAttrDefinition __definitions[]
9595

9696
{Attrs::FUNDAMENTAL, TYPE_CHECK},
9797
{Attrs::NON_EXHAUSTIVE, TYPE_CHECK},
98-
{Attrs::RUSTFMT, EXTERNAL}};
98+
{Attrs::RUSTFMT, EXTERNAL},
99+
100+
{Attrs::TEST, CODE_GENERATION},
101+
{Attrs::SIMD_TEST, CODE_GENERATION}};
99102

100103
BuiltinAttributeMappings *
101104
BuiltinAttributeMappings::get ()

0 commit comments

Comments
 (0)