2021-04-27 16:55:11 +02:00
|
|
|
// This test requires a feature gated const fn and will stop working in the future.
|
|
|
|
|
2022-09-23 18:03:44 +02:00
|
|
|
#![feature(const_btree_len)]
|
2021-04-27 16:55:11 +02:00
|
|
|
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
|
2022-09-23 18:03:44 +02:00
|
|
|
struct Foo(usize);
|
2021-04-27 16:55:11 +02:00
|
|
|
impl Foo {
|
|
|
|
fn new() -> Self {
|
2022-09-23 18:03:44 +02:00
|
|
|
Self(BTreeMap::len(&BTreeMap::<u8, u8>::new()))
|
2021-04-27 16:55:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|