summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/cannot-infer-type-for-const-param.rs
blob: a6e767489b79e3aeb8fbd1f6d046bba11ca0f0d7 (plain)
1
2
3
4
5
6
7
8
9
10
// check-pass

// This test confirms that the types can be inferred correctly for this example with const
// generics. Previously this would ICE, and more recently error.

struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]);

fn main() {
    let _ = Foo::<3>([1, 2, 3]);
}