rust/src/test/ui/parser/default.stderr
2019-11-06 17:26:20 -08:00

26 lines
903 B
Plaintext

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