aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-04-01 17:45:00 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2025-04-04 08:24:54 +0000
commit9684625ab897b3ff322642d99563bac64b1383b7 (patch)
treefd62350dd297f9c9cd5ea20f6c415276d134017c
parent8022ca11ed991cba51843c3226e4de9c2b795ecc (diff)
downloadgcc-9684625ab897b3ff322642d99563bac64b1383b7.zip
gcc-9684625ab897b3ff322642d99563bac64b1383b7.tar.gz
gcc-9684625ab897b3ff322642d99563bac64b1383b7.tar.bz2
feature: Add min_specialization feature
gcc/rust/ChangeLog: * checks/errors/rust-feature.cc (Feature::create): Handle `#![feature(min_specialization)]`. * checks/errors/rust-feature.h: Likewise.
-rw-r--r--gcc/rust/checks/errors/rust-feature.cc4
-rw-r--r--gcc/rust/checks/errors/rust-feature.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/checks/errors/rust-feature.cc b/gcc/rust/checks/errors/rust-feature.cc
index 0487261..d7484e5 100644
--- a/gcc/rust/checks/errors/rust-feature.cc
+++ b/gcc/rust/checks/errors/rust-feature.cc
@@ -55,6 +55,9 @@ Feature::create (Feature::Name f)
"1.11.0", 37854);
case Feature::Name::PRELUDE_IMPORT:
return Feature (f, Feature::State::ACTIVE, "prelude_import", "1.0.0");
+ case Feature::Name::MIN_SPECIALIZATION:
+ return Feature (f, Feature::State::ACTIVE, "min_specialization",
+ "1.0.0" /* FIXME: What version here? */, 31844);
case Feature::Name::AUTO_TRAITS:
return Feature (f, Feature::State::ACTIVE, "optin_builtin_traits",
"1.0.0", 13231);
@@ -80,6 +83,7 @@ const std::map<std::string, Feature::Name> Feature::name_hash_map = {
{"raw_ref_op", Feature::Name::RAW_REF_OP},
{"exclusive_range_pattern", Feature::Name::EXCLUSIVE_RANGE_PATTERN},
{"prelude_import", Feature::Name::PRELUDE_IMPORT},
+ {"min_specialization", Feature::Name::MIN_SPECIALIZATION},
}; // namespace Rust
tl::optional<Feature::Name>
diff --git a/gcc/rust/checks/errors/rust-feature.h b/gcc/rust/checks/errors/rust-feature.h
index a078dbd..be59267 100644
--- a/gcc/rust/checks/errors/rust-feature.h
+++ b/gcc/rust/checks/errors/rust-feature.h
@@ -51,6 +51,7 @@ public:
RAW_REF_OP,
EXCLUSIVE_RANGE_PATTERN,
PRELUDE_IMPORT,
+ MIN_SPECIALIZATION,
};
const std::string &as_string () { return m_name_str; }