]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / 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 }