1 error: expected one of `async`, `const`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found keyword `pub`
2 --> $DIR/default.rs:24:13
4 LL | impl Foo for u32 {
5 | - while parsing this item list starting here
6 LL | default pub fn foo<T: Default>() -> T { T::default() }
9 | expected one of 7 possible tokens
10 | help: visibility `pub` must come before `default pub`: `pub default pub`
13 | - the item list ends here
15 error[E0449]: unnecessary visibility qualifier
16 --> $DIR/default.rs:18:5
18 LL | pub default fn foo<T: Default>() -> T {
19 | ^^^ `pub` not permitted here because it's implied
21 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
22 --> $DIR/default.rs:4:12
24 LL | #![feature(specialization)]
27 = note: `#[warn(incomplete_features)]` on by default
28 = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
29 = help: consider using `min_specialization` instead, which is more stable and complete
31 error[E0046]: not all trait items implemented, missing: `foo`
32 --> $DIR/default.rs:23:1
34 LL | fn foo<T: Default>() -> T;
35 | -------------------------- `foo` from trait
37 LL | impl Foo for u32 {
38 | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
40 error: aborting due to 3 previous errors; 1 warning emitted
42 Some errors have detailed explanations: E0046, E0449.
43 For more information about an error, try `rustc --explain E0046`.