2020-11-20 18:00:00 -06:00
|
|
|
// Checks that we can build a clone shim for array with generic size.
|
|
|
|
// Regression test for issue #79269.
|
|
|
|
//
|
|
|
|
// build-pass
|
2021-03-04 07:35:11 -06:00
|
|
|
// compile-flags: -Zmir-opt-level=3 -Zvalidate-mir
|
2020-11-20 18:00:00 -06:00
|
|
|
#[derive(Clone)]
|
|
|
|
struct Array<T, const N: usize>([T; N]);
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = Array([0u32, 1u32, 2u32]).clone();
|
|
|
|
}
|