summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/infer-placeholder-in-non-suggestable-pos.rs
blob: 1e0b77b0d3bd311b78a2f8d842e8d34e93b15c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
trait Trait {
    const ASSOC: i32;
}

impl Trait for () {
    const ASSOC: &dyn Fn(_) = 1i32;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
    //~| WARN `&` without an explicit lifetime name cannot be used here
    //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
}

fn main() {}