2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
|
|
|
|
2016-02-23 00:46:45 -06:00
|
|
|
// Test that you can list the more specific impl before the more general one.
|
|
|
|
|
2020-05-17 03:22:48 -05:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2016-02-23 00:46:45 -06:00
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type Out;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for bool {
|
|
|
|
type Out = ();
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Foo for T {
|
|
|
|
default type Out = bool;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|