rust/src/test/ui/mir/mir-inlining/array-clone-with-generic-size.rs
Bastian Kauschke c4ba60a191 update tests
2020-12-26 18:24:10 +01:00

12 lines
295 B
Rust

// 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=2 -Zvalidate-mir
#[derive(Clone)]
struct Array<T, const N: usize>([T; N]);
fn main() {
let _ = Array([0u32, 1u32, 2u32]).clone();
}