]> git.lizzy.rs Git - rust.git/blob - src/test/ui/collections-const-new.rs
Auto merge of #81238 - RalfJung:copy-intrinsics, r=m-ou-se
[rust.git] / src / test / ui / collections-const-new.rs
1 // check-pass
2
3 // Test several functions can be used for constants
4 // 1. Vec::new()
5 // 2. String::new()
6 // 3. BTreeMap::new()
7 // 4. BTreeSet::new()
8
9 #![feature(const_btree_new)]
10
11 const MY_VEC: Vec<usize> = Vec::new();
12
13 const MY_STRING: String = String::new();
14
15 use std::collections::{BTreeMap, BTreeSet};
16 const MY_BTREEMAP: BTreeMap<u32, u32> = BTreeMap::new();
17
18 const MY_BTREESET: BTreeSet<u32> = BTreeSet::new();
19
20 fn main() {}