summary refs log tree commit diff
path: root/src/test/ui/parser/default.stderr
blob: 15c49e8b6270b3789e467dc72c784c177e0295f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error: `default` is not followed by an item
  --> $DIR/default.rs:22:5
   |
LL |     default pub fn foo<T: Default>() -> T { T::default() }
   |     ^^^^^^^ the `default` qualifier
   |
   = note: only `fn`, `const`, `type`, or `impl` items may be prefixed by `default`

error: non-item in item list
  --> $DIR/default.rs:22:13
   |
LL | impl Foo for u32 {
   |                  - item list starts here
LL |     default pub fn foo<T: Default>() -> T { T::default() }
   |             ^^^ non-item starts here
...
LL | }
   | - item list ends here

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 4 previous errors

Some errors have detailed explanations: E0046, E0449.
For more information about an error, try `rustc --explain E0046`.