]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes |
2 | --> $DIR/specialization-no-default.rs:1:12 | |
3 | | | |
4 | LL | #![feature(specialization)] | |
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 | |
29967ef6 | 9 | = help: consider using `min_specialization` instead, which is more stable and complete |
f035d41b | 10 | |
b7449926 | 11 | error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default` |
e1599b0c | 12 | --> $DIR/specialization-no-default.rs:20:5 |
b7449926 XL |
13 | | |
14 | LL | / impl<T> Foo for T { | |
15 | LL | | fn foo(&self) {} | |
16 | LL | | fn bar(&self) {} | |
17 | LL | | } | |
18 | | |_- parent `impl` is here | |
19 | ... | |
532ac7d7 | 20 | LL | fn foo(&self) {} |
b7449926 XL |
21 | | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo` |
22 | | | |
23 | = note: to specialize, `foo` in the parent `impl` must be marked `default` | |
24 | ||
25 | error[E0520]: `bar` specializes an item from a parent `impl`, but that item is not marked `default` | |
e1599b0c | 26 | --> $DIR/specialization-no-default.rs:23:5 |
b7449926 XL |
27 | | |
28 | LL | / impl<T> Foo for T { | |
29 | LL | | fn foo(&self) {} | |
30 | LL | | fn bar(&self) {} | |
31 | LL | | } | |
32 | | |_- parent `impl` is here | |
33 | ... | |
532ac7d7 | 34 | LL | fn bar(&self) {} |
b7449926 XL |
35 | | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar` |
36 | | | |
37 | = note: to specialize, `bar` in the parent `impl` must be marked `default` | |
38 | ||
39 | error[E0520]: `T` specializes an item from a parent `impl`, but that item is not marked `default` | |
e1599b0c | 40 | --> $DIR/specialization-no-default.rs:37:5 |
b7449926 XL |
41 | | |
42 | LL | / impl<T> Bar for T { | |
43 | LL | | type T = u8; | |
44 | LL | | } | |
45 | | |_- parent `impl` is here | |
46 | ... | |
532ac7d7 | 47 | LL | type T = (); |
b7449926 XL |
48 | | ^^^^^^^^^^^^ cannot specialize default item `T` |
49 | | | |
50 | = note: to specialize, `T` in the parent `impl` must be marked `default` | |
51 | ||
52 | error[E0520]: `baz` specializes an item from a parent `impl`, but that item is not marked `default` | |
e1599b0c | 53 | --> $DIR/specialization-no-default.rs:55:5 |
b7449926 XL |
54 | | |
55 | LL | / impl<T: Clone> Baz for T { | |
56 | LL | | fn baz(&self) {} | |
57 | LL | | } | |
58 | | |_- parent `impl` is here | |
59 | ... | |
532ac7d7 | 60 | LL | fn baz(&self) {} |
b7449926 XL |
61 | | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz` |
62 | | | |
63 | = note: to specialize, `baz` in the parent `impl` must be marked `default` | |
64 | ||
65 | error[E0520]: `redundant` specializes an item from a parent `impl`, but that item is not marked `default` | |
e1599b0c | 66 | --> $DIR/specialization-no-default.rs:74:5 |
b7449926 XL |
67 | | |
68 | LL | / impl<T: Clone> Redundant for T { | |
69 | LL | | fn redundant(&self) {} | |
70 | LL | | } | |
71 | | |_- parent `impl` is here | |
72 | ... | |
532ac7d7 | 73 | LL | fn redundant(&self) {} |
b7449926 XL |
74 | | ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant` |
75 | | | |
76 | = note: to specialize, `redundant` in the parent `impl` must be marked `default` | |
77 | ||
f035d41b | 78 | error: aborting due to 5 previous errors; 1 warning emitted |
b7449926 XL |
79 | |
80 | For more information about this error, try `rustc --explain E0520`. |