about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs
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() {}