Skip to content

Commit da78c1f

Browse files
committed
Make feature(const_btree_len) implied by feature(const_btree_new)
1 parent f606127 commit da78c1f

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

library/alloc/src/collections/btree/map.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,11 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
23922392
/// ```
23932393
#[must_use]
23942394
#[stable(feature = "rust1", since = "1.0.0")]
2395-
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
2395+
#[rustc_const_unstable(
2396+
feature = "const_btree_len",
2397+
issue = "71835",
2398+
implied_by = "const_btree_new"
2399+
)]
23962400
pub const fn len(&self) -> usize {
23972401
self.length
23982402
}
@@ -2413,7 +2417,11 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
24132417
/// ```
24142418
#[must_use]
24152419
#[stable(feature = "rust1", since = "1.0.0")]
2416-
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
2420+
#[rustc_const_unstable(
2421+
feature = "const_btree_len",
2422+
issue = "71835",
2423+
implied_by = "const_btree_new"
2424+
)]
24172425
pub const fn is_empty(&self) -> bool {
24182426
self.len() == 0
24192427
}

library/alloc/src/collections/btree/set.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,11 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
11741174
/// ```
11751175
#[must_use]
11761176
#[stable(feature = "rust1", since = "1.0.0")]
1177-
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
1177+
#[rustc_const_unstable(
1178+
feature = "const_btree_len",
1179+
issue = "71835",
1180+
implied_by = "const_btree_new"
1181+
)]
11781182
pub const fn len(&self) -> usize {
11791183
self.map.len()
11801184
}
@@ -1193,7 +1197,11 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
11931197
/// ```
11941198
#[must_use]
11951199
#[stable(feature = "rust1", since = "1.0.0")]
1196-
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
1200+
#[rustc_const_unstable(
1201+
feature = "const_btree_len",
1202+
issue = "71835",
1203+
implied_by = "const_btree_new"
1204+
)]
11971205
pub const fn is_empty(&self) -> bool {
11981206
self.len() == 0
11991207
}

0 commit comments

Comments
 (0)