rust/src/test/ui/const-generics/type_mismatch.rs

10 lines
189 B
Rust

fn foo<const N: usize>() -> [u8; N] {
bar::<N>() //~ ERROR mismatched types
}
fn bar<const N: u8>() -> [u8; N] {}
//~^ ERROR mismatched types
//~| ERROR mismatched types
fn main() {}