]> git.lizzy.rs Git - rust.git/blob - tests/ui/type/type-dependent-def-issue-49241.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / type / type-dependent-def-issue-49241.rs
1 fn main() {
2     let v = vec![0];
3     const l: usize = v.count(); //~ ERROR attempt to use a non-constant value in a constant
4     let s: [u32; l] = v.into_iter().collect();
5     //~^ constant
6 }