about summary refs log tree commit diff
path: root/tests/ui/associated-consts/associated-const-in-trait.rs
blob: 4d88f4ff53161a7440a596d525ec357e28e5a85b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// #29924

trait Trait {
    const N: usize;
}

impl dyn Trait {
    //~^ ERROR the trait `Trait` is not dyn compatible [E0038]
    const fn n() -> usize { Self::N }
    //~^ ERROR the trait `Trait` is not dyn compatible [E0038]
    //~| ERROR the trait `Trait` is not dyn compatible
}

fn main() {}