rust-clippy/tests/ui/crashes/ice-7126.rs
Nilstrieb 334f4535bd 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.
2022-09-23 20:55:37 +02:00

14 lines
279 B
Rust

// This test requires a feature gated const fn and will stop working in the future.
#![feature(const_btree_len)]
use std::collections::BTreeMap;
struct Foo(usize);
impl Foo {
fn new() -> Self {
Self(BTreeMap::len(&BTreeMap::<u8, u8>::new()))
}
}
fn main() {}