diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-05-20 13:26:43 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:31 +0100 |
commit | 8cd5487f4415f1e6e392f24665a8befed6c894ad (patch) | |
tree | 88d071bd1c6ebe76c3a0b66e7786942c3f679c94 /gcc/rust/util/rust-attribute-values.h | |
parent | 6fef5bc497572798b817ad7afdcf5e5fb00c7910 (diff) | |
download | gcc-8cd5487f4415f1e6e392f24665a8befed6c894ad.zip gcc-8cd5487f4415f1e6e392f24665a8befed6c894ad.tar.gz gcc-8cd5487f4415f1e6e392f24665a8befed6c894ad.tar.bz2 |
gccrs: Add dropck_eyepatch feature gate for may_dangle
Add a new feature gate for may_dangle generic param outer attributes.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc: Visit and gate may_dangle
attributes.
* checks/errors/rust-feature-gate.h: Update visit function prototype
and add a new member function to check on a set of attributes whether
one is may_dangle.
* checks/errors/rust-feature.cc (Feature::create): Add new
dropck_eyepatch feature.
* checks/errors/rust-feature.h: Likewise.
* util/rust-attribute-values.h: Add new may_dangle attribute value.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/util/rust-attribute-values.h')
-rw-r--r-- | gcc/rust/util/rust-attribute-values.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h index fec73b1..9041701 100644 --- a/gcc/rust/util/rust-attribute-values.h +++ b/gcc/rust/util/rust-attribute-values.h @@ -55,6 +55,7 @@ public: static constexpr auto &UNSTABLE = "unstable"; static constexpr auto &RUSTC_CONST_STABLE = "rustc_const_stable"; static constexpr auto &RUSTC_CONST_UNSTABLE = "rustc_const_unstable"; + static constexpr auto &MAY_DANGLE = "may_dangle"; }; } // namespace Values } // namespace Rust |