Skip to content

Commit 72e02b0

Browse files
authored
Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk
replace `#[allow_internal_unstable]` with `#[rustc_allow_const_fn_unstable]` for `const fn`s `#[allow_internal_unstable]` is currently used to side-step feature gate and stability checks. While it was originally only meant to be used only on macros, its use was expanded to `const fn`s. This pr adds stricter checks for the usage of `#[allow_internal_unstable]` (only on macros) and introduces the `#[rustc_allow_const_fn_unstable]` attribute for usage on `const fn`s. This pr does not change any of the functionality associated with the use of `#[allow_internal_unstable]` on macros or the usage of `#[rustc_allow_const_fn_unstable]` (instead of `#[allow_internal_unstable]`) on `const fn`s (see #69399 (comment)). Note: The check for `#[rustc_allow_const_fn_unstable]` currently only validates that the attribute is used on a function, because I don't know how I would check if the function is a `const fn` at the place of the check. I therefore openend this as a 'draft pull request'. Closes #69399 r? @oli-obk
2 parents dbdc61f + ac2c599 commit 72e02b0

31 files changed

+177
-41
lines changed

compiler/rustc_attr/src/builtin.rs

+21-4
Original file line numberDiff line numberDiff line change
@@ -1013,13 +1013,28 @@ pub fn allow_internal_unstable<'a>(
10131013
sess: &'a Session,
10141014
attrs: &'a [Attribute],
10151015
) -> Option<impl Iterator<Item = Symbol> + 'a> {
1016-
let attrs = sess.filter_by_name(attrs, sym::allow_internal_unstable);
1016+
allow_unstable(sess, attrs, sym::allow_internal_unstable)
1017+
}
1018+
1019+
pub fn rustc_allow_const_fn_unstable<'a>(
1020+
sess: &'a Session,
1021+
attrs: &'a [Attribute],
1022+
) -> Option<impl Iterator<Item = Symbol> + 'a> {
1023+
allow_unstable(sess, attrs, sym::rustc_allow_const_fn_unstable)
1024+
}
1025+
1026+
fn allow_unstable<'a>(
1027+
sess: &'a Session,
1028+
attrs: &'a [Attribute],
1029+
symbol: Symbol,
1030+
) -> Option<impl Iterator<Item = Symbol> + 'a> {
1031+
let attrs = sess.filter_by_name(attrs, symbol);
10171032
let list = attrs
10181033
.filter_map(move |attr| {
10191034
attr.meta_item_list().or_else(|| {
10201035
sess.diagnostic().span_err(
10211036
attr.span,
1022-
"`allow_internal_unstable` expects a list of feature names",
1037+
&format!("`{}` expects a list of feature names", symbol.to_ident_string()),
10231038
);
10241039
None
10251040
})
@@ -1029,8 +1044,10 @@ pub fn allow_internal_unstable<'a>(
10291044
Some(list.into_iter().filter_map(move |it| {
10301045
let name = it.ident().map(|ident| ident.name);
10311046
if name.is_none() {
1032-
sess.diagnostic()
1033-
.span_err(it.span(), "`allow_internal_unstable` expects feature names");
1047+
sess.diagnostic().span_err(
1048+
it.span(),
1049+
&format!("`{}` expects feature names", symbol.to_ident_string()),
1050+
);
10341051
}
10351052
name
10361053
}))

compiler/rustc_feature/src/active.rs

+5
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ declare_features! (
210210
/// it is not on path for eventual stabilization).
211211
(active, no_niche, "1.42.0", None, None),
212212

213+
/// Allows using `#[rustc_allow_const_fn_unstable]`.
214+
/// This is an attribute on `const fn` for the same
215+
/// purpose as `#[allow_internal_unstable]`.
216+
(active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
217+
213218
// no-tracking-issue-end
214219

215220
// -------------------------------------------------------------------------

compiler/rustc_feature/src/builtin_attrs.rs

+4
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
379379
allow_internal_unstable, AssumedUsed, template!(Word, List: "feat1, feat2, ..."),
380380
"allow_internal_unstable side-steps feature gating and stability checks",
381381
),
382+
gated!(
383+
rustc_allow_const_fn_unstable, AssumedUsed, template!(Word, List: "feat1, feat2, ..."),
384+
"rustc_allow_const_fn_unstable side-steps feature gating and stability checks"
385+
),
382386
gated!(
383387
allow_internal_unsafe, Normal, template!(Word),
384388
"allow_internal_unsafe side-steps the unsafe_code lint",

compiler/rustc_mir/src/transform/check_consts/mod.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ pub fn is_lang_panic_fn(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool {
7979
|| Some(def_id) == tcx.lang_items().begin_panic_fn()
8080
}
8181

82-
pub fn allow_internal_unstable(tcx: TyCtxt<'tcx>, def_id: DefId, feature_gate: Symbol) -> bool {
82+
pub fn rustc_allow_const_fn_unstable(
83+
tcx: TyCtxt<'tcx>,
84+
def_id: DefId,
85+
feature_gate: Symbol,
86+
) -> bool {
8387
let attrs = tcx.get_attrs(def_id);
84-
attr::allow_internal_unstable(&tcx.sess, attrs)
88+
attr::rustc_allow_const_fn_unstable(&tcx.sess, attrs)
8589
.map_or(false, |mut features| features.any(|name| name == feature_gate))
8690
}
8791

compiler/rustc_mir/src/transform/check_consts/validation.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,11 @@ impl Validator<'mir, 'tcx> {
292292

293293
Status::Unstable(gate) if self.tcx.features().enabled(gate) => {
294294
let unstable_in_stable = self.ccx.is_const_stable_const_fn()
295-
&& !super::allow_internal_unstable(self.tcx, self.def_id().to_def_id(), gate);
295+
&& !super::rustc_allow_const_fn_unstable(
296+
self.tcx,
297+
self.def_id().to_def_id(),
298+
gate,
299+
);
296300
if unstable_in_stable {
297301
emit_unstable_in_stable_error(self.ccx, span, gate);
298302
}
@@ -807,7 +811,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
807811
}
808812

809813
// Calling an unstable function *always* requires that the corresponding gate
810-
// be enabled, even if the function has `#[allow_internal_unstable(the_gate)]`.
814+
// be enabled, even if the function has `#[rustc_allow_const_fn_unstable(the_gate)]`.
811815
if !tcx.features().declared_lib_features.iter().any(|&(sym, _)| sym == gate) {
812816
self.check_op(ops::FnCallUnstable(callee, Some(gate)));
813817
return;
@@ -821,7 +825,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
821825

822826
// Otherwise, we are something const-stable calling a const-unstable fn.
823827

824-
if super::allow_internal_unstable(tcx, caller, gate) {
828+
if super::rustc_allow_const_fn_unstable(tcx, caller, gate) {
825829
return;
826830
}
827831

@@ -967,8 +971,8 @@ fn emit_unstable_in_stable_error(ccx: &ConstCx<'_, '_>, span: Span, gate: Symbol
967971
)
968972
.span_suggestion(
969973
attr_span,
970-
"otherwise `#[allow_internal_unstable]` can be used to bypass stability checks",
971-
format!("#[allow_internal_unstable({})]\n", gate),
974+
"otherwise `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks",
975+
format!("#[rustc_allow_const_fn_unstable({})]\n", gate),
972976
Applicability::MaybeIncorrect,
973977
)
974978
.emit();

compiler/rustc_passes/src/check_attr.rs

+53
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ impl CheckAttrVisitor<'tcx> {
8585
self.check_export_name(&attr, span, target)
8686
} else if self.tcx.sess.check_name(attr, sym::rustc_args_required_const) {
8787
self.check_rustc_args_required_const(&attr, span, target, item)
88+
} else if self.tcx.sess.check_name(attr, sym::allow_internal_unstable) {
89+
self.check_allow_internal_unstable(&attr, span, target, &attrs)
90+
} else if self.tcx.sess.check_name(attr, sym::rustc_allow_const_fn_unstable) {
91+
self.check_rustc_allow_const_fn_unstable(hir_id, &attr, span, target)
8892
} else {
8993
// lint-only checks
9094
if self.tcx.sess.check_name(attr, sym::cold) {
@@ -719,6 +723,55 @@ impl CheckAttrVisitor<'tcx> {
719723
}
720724
}
721725
}
726+
727+
/// Outputs an error for `#[allow_internal_unstable]` which can only be applied to macros.
728+
/// (Allows proc_macro functions)
729+
fn check_allow_internal_unstable(
730+
&self,
731+
attr: &Attribute,
732+
span: &Span,
733+
target: Target,
734+
attrs: &[Attribute],
735+
) -> bool {
736+
debug!("Checking target: {:?}", target);
737+
if target == Target::Fn {
738+
for attr in attrs {
739+
if self.tcx.sess.is_proc_macro_attr(attr) {
740+
debug!("Is proc macro attr");
741+
return true;
742+
}
743+
}
744+
debug!("Is not proc macro attr");
745+
}
746+
self.tcx
747+
.sess
748+
.struct_span_err(attr.span, "attribute should be applied to a macro")
749+
.span_label(*span, "not a macro")
750+
.emit();
751+
false
752+
}
753+
754+
/// Outputs an error for `#[allow_internal_unstable]` which can only be applied to macros.
755+
/// (Allows proc_macro functions)
756+
fn check_rustc_allow_const_fn_unstable(
757+
&self,
758+
hir_id: HirId,
759+
attr: &Attribute,
760+
span: &Span,
761+
target: Target,
762+
) -> bool {
763+
if let Target::Fn | Target::Method(_) = target {
764+
if self.tcx.is_const_fn_raw(self.tcx.hir().local_def_id(hir_id)) {
765+
return true;
766+
}
767+
}
768+
self.tcx
769+
.sess
770+
.struct_span_err(attr.span, "attribute should be applied to `const fn`")
771+
.span_label(*span, "not a `const fn`")
772+
.emit();
773+
false
774+
}
722775
}
723776

724777
impl Visitor<'tcx> for CheckAttrVisitor<'tcx> {

compiler/rustc_passes/src/check_const.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
8787

8888
let is_feature_allowed = |feature_gate| {
8989
// All features require that the corresponding gate be enabled,
90-
// even if the function has `#[allow_internal_unstable(the_gate)]`.
90+
// even if the function has `#[rustc_allow_const_fn_unstable(the_gate)]`.
9191
if !tcx.features().enabled(feature_gate) {
9292
return false;
9393
}
@@ -105,8 +105,8 @@ impl<'tcx> CheckConstVisitor<'tcx> {
105105
}
106106

107107
// However, we cannot allow stable `const fn`s to use unstable features without an explicit
108-
// opt-in via `allow_internal_unstable`.
109-
attr::allow_internal_unstable(&tcx.sess, &tcx.get_attrs(def_id))
108+
// opt-in via `rustc_allow_const_fn_unstable`.
109+
attr::rustc_allow_const_fn_unstable(&tcx.sess, &tcx.get_attrs(def_id))
110110
.map_or(false, |mut features| features.any(|name| name == feature_gate))
111111
};
112112

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,7 @@ symbols! {
894894
rustc,
895895
rustc_allocator,
896896
rustc_allocator_nounwind,
897+
rustc_allow_const_fn_unstable,
897898
rustc_args_required_const,
898899
rustc_attrs,
899900
rustc_builtin_macro,

library/alloc/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
#![allow(explicit_outlives_requirements)]
7373
#![allow(incomplete_features)]
7474
#![deny(unsafe_op_in_unsafe_fn)]
75+
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
7576
#![cfg_attr(not(test), feature(generator_trait))]
7677
#![cfg_attr(test, feature(test))]
7778
#![cfg_attr(test, feature(new_uninit))]

library/alloc/src/raw_vec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ impl<T> RawVec<T, Global> {
150150
impl<T, A: AllocRef> RawVec<T, A> {
151151
/// Like `new`, but parameterized over the choice of allocator for
152152
/// the returned `RawVec`.
153-
#[allow_internal_unstable(const_fn)]
153+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
154+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
154155
pub const fn new_in(alloc: A) -> Self {
155156
// `cap: 0` means "unallocated". zero-sized types are ignored.
156157
Self { ptr: Unique::dangling(), cap: 0, alloc }

library/core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#![warn(missing_debug_implementations)]
6464
#![allow(explicit_outlives_requirements)]
6565
#![allow(incomplete_features)]
66+
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
6667
#![feature(allow_internal_unstable)]
6768
#![feature(arbitrary_self_types)]
6869
#![feature(asm)]

library/core/src/num/int_macros.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,8 @@ assert_eq!(
20452045
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
20462046
// SAFETY: const sound because integers are plain old datatypes so we can always
20472047
// transmute them to arrays of bytes
2048-
#[allow_internal_unstable(const_fn_transmute)]
2048+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
2049+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
20492050
#[inline]
20502051
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
20512052
// SAFETY: integers are plain old datatypes so we can always transmute them to
@@ -2193,7 +2194,8 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
21932194
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
21942195
// SAFETY: const sound because integers are plain old datatypes so we can always
21952196
// transmute to them
2196-
#[allow_internal_unstable(const_fn_transmute)]
2197+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
2198+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
21972199
#[inline]
21982200
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
21992201
// SAFETY: integers are plain old datatypes so we can always transmute to them

library/core/src/num/uint_macros.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,8 @@ assert_eq!(
18031803
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
18041804
// SAFETY: const sound because integers are plain old datatypes so we can always
18051805
// transmute them to arrays of bytes
1806-
#[allow_internal_unstable(const_fn_transmute)]
1806+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
1807+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
18071808
#[inline]
18081809
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
18091810
// SAFETY: integers are plain old datatypes so we can always transmute them to
@@ -1951,7 +1952,8 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
19511952
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
19521953
// SAFETY: const sound because integers are plain old datatypes so we can always
19531954
// transmute to them
1954-
#[allow_internal_unstable(const_fn_transmute)]
1955+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
1956+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
19551957
#[inline]
19561958
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
19571959
// SAFETY: integers are plain old datatypes so we can always transmute to them

library/core/src/slice/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ impl<T> [T] {
8888
#[rustc_const_stable(feature = "const_slice_len", since = "1.32.0")]
8989
#[inline]
9090
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
91-
#[allow_internal_unstable(const_fn_union)]
91+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_union))]
92+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_union))]
9293
pub const fn len(&self) -> usize {
9394
// SAFETY: this is safe because `&[T]` and `FatPtr<T>` have the same layout.
9495
// Only `std` can make this guarantee.

library/core/src/str/converts.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
157157
#[inline]
158158
#[stable(feature = "rust1", since = "1.0.0")]
159159
#[rustc_const_unstable(feature = "const_str_from_utf8_unchecked", issue = "75196")]
160-
#[allow_internal_unstable(const_fn_transmute)]
160+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
161+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
161162
pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
162163
// SAFETY: the caller must guarantee that the bytes `v` are valid UTF-8.
163164
// Also relies on `&str` and `&[u8]` having the same layout.

library/core/src/str/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ impl str {
219219
#[rustc_const_stable(feature = "str_as_bytes", since = "1.32.0")]
220220
#[inline(always)]
221221
#[allow(unused_attributes)]
222-
#[allow_internal_unstable(const_fn_transmute)]
222+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
223+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
223224
pub const fn as_bytes(&self) -> &[u8] {
224225
// SAFETY: const sound because we transmute two types with the same layout
225226
unsafe { mem::transmute(self) }

library/core/src/task/wake.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ impl RawWakerVTable {
130130
#[rustc_promotable]
131131
#[stable(feature = "futures_api", since = "1.36.0")]
132132
#[rustc_const_stable(feature = "futures_api", since = "1.36.0")]
133-
#[allow_internal_unstable(const_fn_fn_ptr_basics)]
133+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_fn_ptr_basics))]
134+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_fn_ptr_basics))]
134135
pub const fn new(
135136
clone: unsafe fn(*const ()) -> RawWaker,
136137
wake: unsafe fn(*const ()),

library/proc_macro/src/bridge/client.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ fn run_client<A: for<'a, 's> DecodeMut<'a, 's, ()>, R: Encode<()>>(
401401
}
402402

403403
impl Client<fn(crate::TokenStream) -> crate::TokenStream> {
404-
#[allow_internal_unstable(const_fn)]
404+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
405+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
405406
pub const fn expand1(f: fn(crate::TokenStream) -> crate::TokenStream) -> Self {
406407
extern "C" fn run(
407408
bridge: Bridge<'_>,
@@ -414,7 +415,8 @@ impl Client<fn(crate::TokenStream) -> crate::TokenStream> {
414415
}
415416

416417
impl Client<fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream> {
417-
#[allow_internal_unstable(const_fn)]
418+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
419+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
418420
pub const fn expand2(
419421
f: fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream,
420422
) -> Self {
@@ -459,7 +461,8 @@ impl ProcMacro {
459461
}
460462
}
461463

462-
#[allow_internal_unstable(const_fn)]
464+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
465+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
463466
pub const fn custom_derive(
464467
trait_name: &'static str,
465468
attributes: &'static [&'static str],
@@ -468,15 +471,17 @@ impl ProcMacro {
468471
ProcMacro::CustomDerive { trait_name, attributes, client: Client::expand1(expand) }
469472
}
470473

471-
#[allow_internal_unstable(const_fn)]
474+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
475+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
472476
pub const fn attr(
473477
name: &'static str,
474478
expand: fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream,
475479
) -> Self {
476480
ProcMacro::Attr { name, client: Client::expand2(expand) }
477481
}
478482

479-
#[allow_internal_unstable(const_fn)]
483+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
484+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
480485
pub const fn bang(
481486
name: &'static str,
482487
expand: fn(crate::TokenStream) -> crate::TokenStream,

library/proc_macro/src/bridge/scoped_cell.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ impl<'a, 'b, T: LambdaL> DerefMut for RefMutL<'a, 'b, T> {
3535
pub struct ScopedCell<T: LambdaL>(Cell<<T as ApplyL<'static>>::Out>);
3636

3737
impl<T: LambdaL> ScopedCell<T> {
38-
#[allow_internal_unstable(const_fn)]
38+
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
39+
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
3940
pub const fn new(value: <T as ApplyL<'static>>::Out) -> Self {
4041
ScopedCell(Cell::new(value))
4142
}

library/proc_macro/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
test(no_crate_inject, attr(deny(warnings))),
1919
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
2020
)]
21+
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
2122
#![feature(nll)]
2223
#![feature(staged_api)]
2324
#![feature(const_fn)]

0 commit comments

Comments
 (0)