diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/specialization/specialization-supertraits.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/specialization/specialization-supertraits.rs b/src/test/ui/specialization/specialization-supertraits.rs new file mode 100644 index 000000000..fb85d8019 --- /dev/null +++ b/src/test/ui/specialization/specialization-supertraits.rs @@ -0,0 +1,17 @@ +// run-pass + +#![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() {} |