Skip to content

Commit 41981d1

Browse files
committed
Add a no-op feature gate
1 parent c8f9423 commit 41981d1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
634634
DuplicatesOk, EncodeCrossCrate::Yes,
635635
"allow_internal_unstable side-steps feature gating and stability checks",
636636
),
637+
gated!(
638+
impl_stability, Normal, template!(Word, List: "feat1, feat2, ..."),
639+
DuplicatesOk, EncodeCrossCrate::Yes,
640+
"allow unstable impl",
641+
),
637642
gated!(
638643
allow_internal_unsafe, Normal, template!(Word), WarnFollowing,
639644
EncodeCrossCrate::No, "allow_internal_unsafe side-steps the unsafe_code lint",

compiler/rustc_feature/src/unstable.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,13 @@ declare_features! (
211211
(internal, custom_mir, "1.65.0", None),
212212
/// Outputs useful `assert!` messages
213213
(unstable, generic_assert, "1.63.0", None),
214+
<<<<<<< HEAD
214215
/// Allows using the #[rustc_intrinsic] attribute.
216+
=======
217+
/// Allow declaring an impl as unstable.
218+
(internal, impl_stability, "CURRENT_RUSTC_VERSION", None),
219+
/// Allows using the `rust-intrinsic`'s "ABI".
220+
>>>>>>> bde3d4141a1 (Add a no-op feature gate)
215221
(internal, intrinsics, "1.0.0", None),
216222
/// Allows using `#[lang = ".."]` attribute for linking items to special compiler logic.
217223
(internal, lang_items, "1.0.0", None),

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ symbols! {
11541154
ignore,
11551155
impl_header_lifetime_elision,
11561156
impl_lint_pass,
1157+
impl_stability,
11571158
impl_trait_in_assoc_type,
11581159
impl_trait_in_bindings,
11591160
impl_trait_in_fn_trait_return,

0 commit comments

Comments
 (0)