/// it is not on path for eventual stabilization).
(active, no_niche, "1.42.0", None, None),
+ /// Allows using `#[rustc_allow_const_fn_unstable]`.
+ /// This is an attribute on `const fn` for the same
+ /// purpose as `#[allow_internal_unstable]`.
+ (active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
+
// no-tracking-issue-end
// -------------------------------------------------------------------------
allow_internal_unstable, AssumedUsed, template!(Word, List: "feat1, feat2, ..."),
"allow_internal_unstable side-steps feature gating and stability checks",
),
+ gated!(
+ rustc_allow_const_fn_unstable, AssumedUsed, template!(Word, List: "feat1, feat2, ..."),
+ "rustc_allow_const_fn_unstable side-steps feature gating and stability checks"
+ ),
gated!(
allow_internal_unsafe, Normal, template!(Word),
"allow_internal_unsafe side-steps the unsafe_code lint",
rustc,
rustc_allocator,
rustc_allocator_nounwind,
+ rustc_allow_const_fn_unstable,
rustc_args_required_const,
rustc_attrs,
rustc_builtin_macro,
--- /dev/null
+#![allow(unused_macros)]
+
+#[rustc_allow_const_fn_unstable()] //~ ERROR rustc_allow_const_fn_unstable side-steps
+const fn foo() { }
+
+fn main() {}
--- /dev/null
+error[E0658]: rustc_allow_const_fn_unstable side-steps feature gating and stability checks
+ --> $DIR/feature-gate-rustc-allow-const-fn-unstable.rs:3:1
+ |
+LL | #[rustc_allow_const_fn_unstable()]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #69399 <https://github.com/rust-lang/rust/issues/69399> for more information
+ = help: add `#![feature(rustc_allow_const_fn_unstable)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.