summary refs log tree commit diff
path: root/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.rs
blob: ad7d972879fff98e7f9d5f64048b826df5de975c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
trait Trait<const N: dyn Trait = bar> {
    //~^ ERROR cannot find value `bar` in this scope
    //~| ERROR cycle detected when computing type of `Trait::N`
    fn fnc<const N: dyn Trait = u32>(&self) -> dyn Trait {
        //~^ ERROR the name `N` is already used for a generic parameter in this item's generic parameters
        //~| ERROR expected value, found builtin type `u32`
        //~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
        bar
        //~^ ERROR cannot find value `bar` in this scope
    }
}

fn main() {}