4 #![feature(const_in_array_repeat_expressions)]
6 // Some type that is not copyable.
9 const fn type_no_copy() -> Option<Bar> {
13 const fn type_copy() -> u32 {
17 const _: [u32; 2] = [type_copy(); 2];
19 // This is allowed because all promotion contexts use the explicit rules for promotability when
20 // inside an explicit const context.
21 const _: [Option<Bar>; 2] = [type_no_copy(); 2];