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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
309 B
Rust
Raw Normal View History

// run-pass
// Test that you can list the more specific impl before the more general one.
2020-05-17 16:22:48 +08:00
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
type Out;
}
impl Foo for bool {
type Out = ();
}
impl<T> Foo for T {
default type Out = bool;
}
fn main() {}