]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/cannot-infer-type-for-const-param.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / const-generics / cannot-infer-type-for-const-param.rs
1 // check-pass
2
3 // This test confirms that the types can be inferred correctly for this example with const
4 // generics. Previously this would ICE, and more recently error.
5
6 struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]);
7
8 fn main() {
9     let _ = Foo::<3>([1, 2, 3]);
10 }