aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-attribute-values.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-08-21 15:09:23 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2024-08-22 12:30:27 +0000
commit06e8b826d77d47467cb378d122a04465be28e2f4 (patch)
tree0888ff81747ebdb67e5e7244711559379e303a71 /gcc/rust/util/rust-attribute-values.h
parent51948d296cda2828e6537db4a2fccad39b1281b7 (diff)
downloadgcc-06e8b826d77d47467cb378d122a04465be28e2f4.zip
gcc-06e8b826d77d47467cb378d122a04465be28e2f4.tar.gz
gcc-06e8b826d77d47467cb378d122a04465be28e2f4.tar.bz2
attributes: Start handling prelude_import properly
This commit adds basic handling for the `#[prelude_import]` attribute, without doing anything functionality wise. gcc/rust/ChangeLog: * checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add base feature gating for `#[feature(prelude_import)]`. * checks/errors/rust-feature-gate.h: Likewise. * checks/errors/rust-feature.cc (Feature::create): Likewise. * checks/errors/rust-feature.h: Likewise. * util/rust-attribute-values.h: Add base handling for `#[prelude_import]` attribute. * util/rust-attributes.cc: Likewise. gcc/testsuite/ChangeLog: * rust/compile/prelude_import.rs: New test.
Diffstat (limited to 'gcc/rust/util/rust-attribute-values.h')
-rw-r--r--gcc/rust/util/rust-attribute-values.h1
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 428a86f..fa316b4 100644
--- a/gcc/rust/util/rust-attribute-values.h
+++ b/gcc/rust/util/rust-attribute-values.h
@@ -56,6 +56,7 @@ public:
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";
+ static constexpr auto &PRELUDE_IMPORT = "prelude_import";
};
} // namespace Values
} // namespace Rust