diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/consts/issue-88071.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-88071.rs b/src/test/ui/consts/issue-88071.rs new file mode 100644 index 000000000..1c38c43e6 --- /dev/null +++ b/src/test/ui/consts/issue-88071.rs @@ -0,0 +1,20 @@ +// check-pass +// +// regression test for #88071 + +#![feature(const_btree_new)] + +use std::collections::BTreeMap; + +pub struct CustomMap<K, V>(BTreeMap<K, V>); + +impl<K, V> CustomMap<K, V> +where + K: Ord, +{ + pub const fn new() -> Self { + CustomMap(BTreeMap::new()) + } +} + +fn main() {} |