]>
Commit | Line | Data |
---|---|---|
72b1a166 FG |
1 | warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes |
2 | --> $DIR/non-defaulted-item-fail.rs:1:12 | |
3 | | | |
4 | LL | #![feature(specialization, associated_type_defaults)] | |
5 | | ^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `#[warn(incomplete_features)]` on by default | |
8 | = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information | |
9 | = help: consider using `min_specialization` instead, which is more stable and complete | |
10 | ||
e74abb32 | 11 | error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default` |
72b1a166 | 12 | --> $DIR/non-defaulted-item-fail.rs:30:5 |
e74abb32 XL |
13 | | |
14 | LL | / impl<T> Foo for Box<T> { | |
15 | LL | | type Ty = bool; | |
16 | LL | | const CONST: u8 = 0; | |
17 | LL | | fn foo(&self) -> bool { false } | |
18 | LL | | } | |
19 | | |_- parent `impl` is here | |
20 | ... | |
21 | LL | type Ty = Vec<()>; | |
22 | | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty` | |
23 | | | |
24 | = note: to specialize, `Ty` in the parent `impl` must be marked `default` | |
25 | ||
26 | error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default` | |
72b1a166 | 27 | --> $DIR/non-defaulted-item-fail.rs:32:5 |
e74abb32 XL |
28 | | |
29 | LL | / impl<T> Foo for Box<T> { | |
30 | LL | | type Ty = bool; | |
31 | LL | | const CONST: u8 = 0; | |
32 | LL | | fn foo(&self) -> bool { false } | |
33 | LL | | } | |
34 | | |_- parent `impl` is here | |
35 | ... | |
36 | LL | const CONST: u8 = 42; | |
37 | | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST` | |
38 | | | |
39 | = note: to specialize, `CONST` in the parent `impl` must be marked `default` | |
40 | ||
41 | error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default` | |
72b1a166 | 42 | --> $DIR/non-defaulted-item-fail.rs:34:5 |
e74abb32 XL |
43 | | |
44 | LL | / impl<T> Foo for Box<T> { | |
45 | LL | | type Ty = bool; | |
46 | LL | | const CONST: u8 = 0; | |
47 | LL | | fn foo(&self) -> bool { false } | |
48 | LL | | } | |
49 | | |_- parent `impl` is here | |
50 | ... | |
51 | LL | fn foo(&self) -> bool { true } | |
52 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo` | |
53 | | | |
54 | = note: to specialize, `foo` in the parent `impl` must be marked `default` | |
55 | ||
56 | error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default` | |
72b1a166 | 57 | --> $DIR/non-defaulted-item-fail.rs:46:5 |
e74abb32 XL |
58 | | |
59 | LL | impl<T> Foo for Vec<T> {} | |
60 | | ------------------------- parent `impl` is here | |
61 | ... | |
62 | LL | type Ty = Vec<()>; | |
63 | | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty` | |
64 | | | |
65 | = note: to specialize, `Ty` in the parent `impl` must be marked `default` | |
66 | ||
67 | error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default` | |
72b1a166 | 68 | --> $DIR/non-defaulted-item-fail.rs:48:5 |
e74abb32 XL |
69 | | |
70 | LL | impl<T> Foo for Vec<T> {} | |
71 | | ------------------------- parent `impl` is here | |
72 | ... | |
73 | LL | const CONST: u8 = 42; | |
74 | | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST` | |
75 | | | |
76 | = note: to specialize, `CONST` in the parent `impl` must be marked `default` | |
77 | ||
78 | error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default` | |
72b1a166 | 79 | --> $DIR/non-defaulted-item-fail.rs:50:5 |
e74abb32 XL |
80 | | |
81 | LL | impl<T> Foo for Vec<T> {} | |
82 | | ------------------------- parent `impl` is here | |
83 | ... | |
84 | LL | fn foo(&self) -> bool { true } | |
85 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo` | |
86 | | | |
87 | = note: to specialize, `foo` in the parent `impl` must be marked `default` | |
88 | ||
72b1a166 | 89 | error: aborting due to 6 previous errors; 1 warning emitted |
e74abb32 XL |
90 | |
91 | For more information about this error, try `rustc --explain E0520`. |