blob: 1cf755b2c565dab91fc91ab656ef177fd91d9505 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
trait Trait {
#[type_const]
//~^ ERROR experimental
const ASSOC: usize;
}
// FIXME(mgca): add suggestion for mgca to this error
fn foo<T: Trait>() -> [u8; <T as Trait>::ASSOC] {
//~^ ERROR generic parameters may not be used in const operations
loop {}
}
fn main() {}
|