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

12 lines
259 B
Rust

impl X {
//~^ ERROR cannot find type
fn getn<const N: usize>() -> [u8; N] {
getn::<N>()
}
}
fn getn<const N: cfg_attr>() -> [u8; N] {}
//~^ ERROR expected type, found built-in attribute `cfg_attr`
//~| ERROR mismatched types
fn main() {}