]> git.lizzy.rs Git - rust.git/blob - src/test/ui/collections-const-new.rs
Rollup merge of #65965 - GuillaumeGomez:clean-up-librustc_typeck-error-codes, r=Mark...
[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
7 const MY_VEC: Vec<usize> = Vec::new();
8
9 const MY_STRING: String = String::new();
10
11 fn main() {}