]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-blocks/fn-call-in-non-const.rs
Remove const_in_array_rep_expr
[rust.git] / src / test / ui / consts / const-blocks / fn-call-in-non-const.rs
1 // Some type that is not copyable.
2 struct Bar;
3
4 const fn no_copy() -> Option<Bar> {
5     None
6 }
7
8 const fn copy() -> u32 {
9     3
10 }
11
12 fn main() {
13     let _: [u32; 2] = [copy(); 2];
14     let _: [Option<Bar>; 2] = [no_copy(); 2];
15     //~^ ERROR the trait bound `Option<Bar>: Copy` is not satisfied
16 }