]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/default.stderr
Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup
[rust.git] / src / test / ui / parser / default.stderr
1 error: `default` is not followed by an item
2   --> $DIR/default.rs:22:5
3    |
4 LL |     default pub fn foo<T: Default>() -> T { T::default() }
5    |     ^^^^^^^ the `default` qualifier
6    |
7    = note: only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`
8
9 error: non-item in item list
10   --> $DIR/default.rs:22:13
11    |
12 LL | impl Foo for u32 {
13    |                  - item list starts here
14 LL |     default pub fn foo<T: Default>() -> T { T::default() }
15    |             ^^^ non-item starts here
16 ...
17 LL | }
18    | - item list ends here
19
20 error[E0449]: unnecessary visibility qualifier
21   --> $DIR/default.rs:16:5
22    |
23 LL |     pub default fn foo<T: Default>() -> T {
24    |     ^^^ `pub` not permitted here because it's implied
25
26 error[E0046]: not all trait items implemented, missing: `foo`
27   --> $DIR/default.rs:21:1
28    |
29 LL |     fn foo<T: Default>() -> T;
30    |     -------------------------- `foo` from trait
31 ...
32 LL | impl Foo for u32 {
33    | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
34
35 error: aborting due to 4 previous errors
36
37 Some errors have detailed explanations: E0046, E0449.
38 For more information about an error, try `rustc --explain E0046`.