about summary refs log tree commit diff
path: root/tests/ui/mir/mir-inlining/array-clone-with-generic-size.rs
blob: 60f13b96ee2b835d9a608b97d839e737f15d2eed (plain)
1
2
3
4
5
6
7
8
9
10
11
// Checks that we can build a clone shim for array with generic size.
// Regression test for issue #79269.
//
//@ build-pass
//@ compile-flags: -Zmir-opt-level=3 -Zvalidate-mir
#[derive(Clone)]
struct Array<T, const N: usize>([T; N]);

fn main() {
    let _ = Array([0u32, 1u32, 2u32]).clone();
}