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
323 B
Rust
Raw Normal View History

2024-02-07 02:42:01 +00:00
//@ check-pass
2020-05-17 08:22:48 +00: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() {}