]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
feature: Add min_specialization feature
authorArthur Cohen <arthur.cohen@embecosm.com>
Tue, 1 Apr 2025 15:45:00 +0000 (17:45 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Fri, 4 Apr 2025 08:24:54 +0000 (08:24 +0000)
gcc/rust/ChangeLog:

* checks/errors/rust-feature.cc (Feature::create): Handle `#![feature(min_specialization)]`.
* checks/errors/rust-feature.h: Likewise.

gcc/rust/checks/errors/rust-feature.cc
gcc/rust/checks/errors/rust-feature.h

index 04872613d11410af731d911be24d05f88d08c88f..d7484e5357f2e7a196bce5eba4da5321eed8d41a 100644 (file)
@@ -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>
index a078dbda4d28545ef4143bba3d1cea2cadcc8f88..be592671587e89e41798e53d8507e73ffefbdb82 100644 (file)
@@ -51,6 +51,7 @@ public:
     RAW_REF_OP,
     EXCLUSIVE_RANGE_PATTERN,
     PRELUDE_IMPORT,
+    MIN_SPECIALIZATION,
   };
 
   const std::string &as_string () { return m_name_str; }