1 error: expected one of `async`, `const`, `existential`, `extern`, `fn`, `type`, or `unsafe`, found `pub`
2 --> $DIR/default.rs:22:13
4 LL | default pub fn foo<T: Default>() -> T { T::default() }
5 | ^^^ expected one of 7 possible tokens here
7 error[E0449]: unnecessary visibility qualifier
8 --> $DIR/default.rs:16:5
10 LL | pub default fn foo<T: Default>() -> T {
11 | ^^^ `pub` not permitted here because it's implied
13 error[E0046]: not all trait items implemented, missing: `foo`
14 --> $DIR/default.rs:21:1
16 LL | fn foo<T: Default>() -> T;
17 | -------------------------- `foo` from trait
19 LL | impl Foo for u32 {
20 | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
22 error: aborting due to 3 previous errors
24 Some errors have detailed explanations: E0046, E0449.
25 For more information about an error, try `rustc --explain E0046`.