mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 12:18:33 +00:00
14 lines
328 B
Rust
14 lines
328 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
|
||
|
#![feature(min_const_generics)]
|
||
|
|
||
|
#[derive(Clone)]
|
||
|
struct Array<T, const N: usize>([T; N]);
|
||
|
|
||
|
fn main() {
|
||
|
let _ = Array([0u32, 1u32, 2u32]).clone();
|
||
|
}
|