summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization/defaultimpl/out-of-order.rs
blob: 13258ac8c9fe670ba2f39aa6e7e20efe2bcedab4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass

// Test that you can list the more specific impl before the more general one.

#![feature(specialization)] //~ WARN the feature `specialization` is incomplete

trait Foo {
    type Out;
}

impl Foo for bool {
    type Out = ();
}

default impl<T> Foo for T {
    type Out = bool;
}

fn main() {}