Make feature(const_btree_len)
implied by feature(const_btree_new)
This commit is contained in:
parent
f606127be5
commit
da78c1fd43
@ -2392,7 +2392,11 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
|
||||
#[rustc_const_unstable(
|
||||
feature = "const_btree_len",
|
||||
issue = "71835",
|
||||
implied_by = "const_btree_new"
|
||||
)]
|
||||
pub const fn len(&self) -> usize {
|
||||
self.length
|
||||
}
|
||||
@ -2413,7 +2417,11 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
|
||||
#[rustc_const_unstable(
|
||||
feature = "const_btree_len",
|
||||
issue = "71835",
|
||||
implied_by = "const_btree_new"
|
||||
)]
|
||||
pub const fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
|
@ -1174,7 +1174,11 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
|
||||
#[rustc_const_unstable(
|
||||
feature = "const_btree_len",
|
||||
issue = "71835",
|
||||
implied_by = "const_btree_new"
|
||||
)]
|
||||
pub const fn len(&self) -> usize {
|
||||
self.map.len()
|
||||
}
|
||||
@ -1193,7 +1197,11 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_btree_len", issue = "71835")]
|
||||
#[rustc_const_unstable(
|
||||
feature = "const_btree_len",
|
||||
issue = "71835",
|
||||
implied_by = "const_btree_new"
|
||||
)]
|
||||
pub const fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user