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