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