summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/winnow-specializing-impls.rs
blob: d70a915961161c4080bbfaac6e3a541f8f8f1e7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// build-pass
// compile-flags: -Znext-solver

// Tests that the specializing impl `<() as Foo>` holds during codegen.

#![feature(min_specialization)]

trait Foo {
    fn bar();
}

impl<T> Foo for T {
    default fn bar() {}
}

impl Foo for () {
    fn bar() {}
}

fn main() {
    <() as Foo>::bar();
}