1 // Test successful and unsuccessful parsing of the `default` contextual keyword
3 #![feature(specialization)]
4 //~^ WARN the feature `specialization` is incomplete
7 fn foo<T: Default>() -> T;
11 default fn foo<T: Default>() -> T {
17 pub default fn foo<T: Default>() -> T { //~ ERROR unnecessary visibility qualifier
22 impl Foo for u32 { //~ ERROR not all trait items implemented, missing: `foo`
23 default pub fn foo<T: Default>() -> T { T::default() }
24 //~^ ERROR `default` is not followed by an item
25 //~| ERROR non-item in item list