about summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-11-22 07:30:09 +0100
committerRalf Jung <post@ralfj.de>2023-11-22 20:00:56 +0100
commit74834a9d74ce2a26bf0ee609ce2790299226f742 (patch)
treecf6854b1c33387515780acc9f8747b1c3a4d862e /compiler/rustc_feature/src
parentd1583eba66bf1ccb65c3aeaa5de30bcc90ae208c (diff)
downloadrust-74834a9d74ce2a26bf0ee609ce2790299226f742.tar.gz
rust-74834a9d74ce2a26bf0ee609ce2790299226f742.zip
also make 'core_intrinsics' internal
Diffstat (limited to 'compiler/rustc_feature/src')
-rw-r--r--compiler/rustc_feature/src/unstable.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index 40611102250..b4a7ea203fd 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -132,10 +132,12 @@ macro_rules! declare_features {
                         // Accepted/removed features aren't in this file but are never internal
                         // (a removed feature might have been internal, but that's now irrelevant).
                         // Libs features are internal if they end in `_internal` or `_internals`.
+                        // As a special exception we also consider `core_intrinsics` internal;
+                        // renaming that age-old feature is just not worth the hassle.
                         // We just always test the name; it's not a big deal if we accidentally hit
                         // an accepted/removed lang feature that way.
                         let name = feature.as_str();
-                        name.ends_with("_internal") || name.ends_with("_internals")
+                        name == "core_intrinsics" || name.ends_with("_internal") || name.ends_with("_internals")
                     }
                     _ => panic!("`{}` was not listed in `declare_features`", feature),
                 }