Skip to content

Commit 1c5b6d7

Browse files
committed
Auto merge of rust-lang#77464 - ecstatic-morse:const-fn-impl-trait, r=oli-obk
Give `impl Trait` in a `const fn` its own feature gate ...previously it was gated under `#![feature(const_fn)]`. I think we actually want to do this in all const-contexts? If so, this should be `#![feature(const_impl_trait)]` instead. I don't think there's any way to make use of `impl Trait` within a `const` initializer. cc rust-lang#77463 r? `@oli-obk`
2 parents 20eaf1e + 5888249 commit 1c5b6d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
#![feature(const_fn)]
8484
#![feature(const_fn_union)]
8585
#![feature(const_assume)]
86+
#![cfg_attr(not(bootstrap), feature(const_impl_trait))]
8687
#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))]
8788
#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]
8889
#![feature(const_generics)]

0 commit comments

Comments
 (0)