about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-24 23:16:03 +0000
committerbors <bors@rust-lang.org>2021-04-24 23:16:03 +0000
commitb56b175c6c3d77f66793b2062b6325f822c87136 (patch)
tree330de8b31a7fff50d3d8a253decc30cd3f4977c9 /library/alloc
parent42816d61ead7e46d462df997958ccfd514f8c21c (diff)
parent49054c3617bb04ba4f108ab7a5fbe6cda74bcbd3 (diff)
downloadrust-b56b175c6c3d77f66793b2062b6325f822c87136.tar.gz
rust-b56b175c6c3d77f66793b2062b6325f822c87136.zip
Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obk
further split up const_fn feature flag

This continues the work on splitting up `const_fn` into separate feature flags:
* `const_fn_trait_bound` for `const fn` with trait bounds
* `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here)

I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more.

`@oli-obk` are you currently able to do reviews?
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index 14cb1d3b405..3a5dcec668f 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -89,7 +89,8 @@
 #![feature(cfg_target_has_atomic)]
 #![feature(coerce_unsized)]
 #![feature(const_btree_new)]
-#![feature(const_fn)]
+#![cfg_attr(bootstrap, feature(const_fn))]
+#![cfg_attr(not(bootstrap), feature(const_fn_trait_bound))]
 #![feature(cow_is_borrowed)]
 #![feature(const_cow_is_borrowed)]
 #![feature(destructuring_assignment)]