From cde7407ec09fce2041f8e55f2408c2a55c0b05fa Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Tue, 26 Mar 2024 21:57:17 -0400 Subject: gccrs: Recognize rustc_deprecated as a builtin attribute gcc/rust/ChangeLog: * util/rust-attribute-values.h (Attributes::RUSTC_DEPRECATED): New. * util/rust-attributes.cc (__definitions): Add Attributes::RUSTC_DEPRECATED. gcc/testsuite/ChangeLog: * rust/compile/deprecated-fn.rs: New test. Signed-off-by: Owen Avery --- gcc/rust/util/rust-attribute-values.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/rust/util/rust-attribute-values.h') diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h index e284cec..04aef99 100644 --- a/gcc/rust/util/rust-attribute-values.h +++ b/gcc/rust/util/rust-attribute-values.h @@ -48,6 +48,7 @@ public: static constexpr auto &TARGET_FEATURE = "target_feature"; // From now on, these are reserved by the compiler and gated through // #![feature(rustc_attrs)] + static constexpr auto &RUSTC_DEPRECATED = "rustc_deprecated"; static constexpr auto &RUSTC_INHERIT_OVERFLOW_CHECKS = "rustc_inherit_overflow_checks"; static constexpr auto &STABLE = "stable"; -- cgit v1.1