blob: 38f744e99aab4c3c137edaf17050e0aad54e1dbb [file] [log] [blame]
#![feature(const_in_array_repeat_expressions)]
// Some type that is not copyable.
struct Bar;
const fn no_copy() -> Option<Bar> {
None
}
const fn copy() -> u32 {
3
}
fn main() {
let _: [u32; 2] = [copy(); 2];
let _: [Option<Bar>; 2] = [no_copy(); 2];
//~^ ERROR the trait bound `std::option::Option<Bar>: std::marker::Copy` is not satisfied
}