mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 22:50:56 +00:00
Stabilize const BTree{Map,Set}::new
Since `len` and `is_empty` are not const stable yet, this also creates a new feature for them since they previously used the same `const_btree_new` feature.
This commit is contained in:
parent
2063b8f137
commit
334f4535bd
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
// This test requires a feature gated const fn and will stop working in the future.
|
||||
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(const_btree_len)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
struct Foo(BTreeMap<i32, i32>);
|
||||
struct Foo(usize);
|
||||
impl Foo {
|
||||
fn new() -> Self {
|
||||
Self(BTreeMap::new())
|
||||
Self(BTreeMap::len(&BTreeMap::<u8, u8>::new()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue