rust/tests/ui/specialization/defaultimpl/out-of-order.rs

20 lines
312 B
Rust
Raw Normal View History

//@ check-pass
// Test that you can list the more specific impl before the more general one.
2020-05-17 08:22:48 +00:00
#![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() {}