3 // Test that non-method associated functions can be specialized
5 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
11 impl<T: Default> Foo for T {
12 default fn mk() -> T {
17 impl Foo for Vec<u8> {
24 let v1: Vec<i32> = Foo::mk();
25 let v2: Vec<u8> = Foo::mk();
27 assert!(v1.len() == 0);
28 assert!(v2.len() == 1);