rust/tests/ui/specialization/specialization-supertraits.rs

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

18 lines
320 B
Rust
Raw Normal View History

// run-pass
2020-05-17 16:22:48 +08:00
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Test that you can specialize via an explicit trait hierarchy
// FIXME: this doesn't work yet...
trait Parent {}
trait Child: Parent {}
trait Foo {}
impl<T: Parent> Foo for T {}
impl<T: Child> Foo for T {}
fn main() {}