1 error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
2 --> $DIR/non-defaulted-item-fail.rs:29:5
4 LL | / impl<T> Foo for Box<T> {
6 LL | | const CONST: u8 = 0;
7 LL | | fn foo(&self) -> bool { false }
9 | |_- parent `impl` is here
11 LL | type Ty = Vec<()>;
12 | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
14 = note: to specialize, `Ty` in the parent `impl` must be marked `default`
16 error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
17 --> $DIR/non-defaulted-item-fail.rs:31:5
19 LL | / impl<T> Foo for Box<T> {
20 LL | | type Ty = bool;
21 LL | | const CONST: u8 = 0;
22 LL | | fn foo(&self) -> bool { false }
24 | |_- parent `impl` is here
26 LL | const CONST: u8 = 42;
27 | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
29 = note: to specialize, `CONST` in the parent `impl` must be marked `default`
31 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
32 --> $DIR/non-defaulted-item-fail.rs:33:5
34 LL | / impl<T> Foo for Box<T> {
35 LL | | type Ty = bool;
36 LL | | const CONST: u8 = 0;
37 LL | | fn foo(&self) -> bool { false }
39 | |_- parent `impl` is here
41 LL | fn foo(&self) -> bool { true }
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
44 = note: to specialize, `foo` in the parent `impl` must be marked `default`
46 error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
47 --> $DIR/non-defaulted-item-fail.rs:45:5
49 LL | impl<T> Foo for Vec<T> {}
50 | ------------------------- parent `impl` is here
52 LL | type Ty = Vec<()>;
53 | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
55 = note: to specialize, `Ty` in the parent `impl` must be marked `default`
57 error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
58 --> $DIR/non-defaulted-item-fail.rs:47:5
60 LL | impl<T> Foo for Vec<T> {}
61 | ------------------------- parent `impl` is here
63 LL | const CONST: u8 = 42;
64 | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
66 = note: to specialize, `CONST` in the parent `impl` must be marked `default`
68 error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
69 --> $DIR/non-defaulted-item-fail.rs:49:5
71 LL | impl<T> Foo for Vec<T> {}
72 | ------------------------- parent `impl` is here
74 LL | fn foo(&self) -> bool { true }
75 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
77 = note: to specialize, `foo` in the parent `impl` must be marked `default`
79 error: aborting due to 6 previous errors
81 For more information about this error, try `rustc --explain E0520`.