]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/rfc-2203-const-array-repeat-exprs/const-fns.rs
1 // ignore-tidy-linelength
2 // ignore-compare-mode-nll
3 #![feature(const_in_array_repeat_expressions, nll)]
6 // Some type that is not copyable.
9 const fn type_no_copy() -> Option
<Bar
> {
13 const fn type_copy() -> u32 {
18 const ARR
: [Option
<Bar
>; 2] = [type_no_copy(); 2];
19 //~^ ERROR the trait bound `std::option::Option<Bar>: std::marker::Copy` is not satisfied [E0277]
23 const ARR
: [u32; 2] = [type_copy(); 2];