Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 497 Bytes
// build-pass (FIXME(62277): could be check-pass?)
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
// 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]); //~ ERROR type annotations needed
//~^ ERROR mismatched types
You can’t perform that action at this time.