]> git.lizzy.rs Git - rust.git/blob - tests/ui/specialization/non-defaulted-item-fail.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / specialization / non-defaulted-item-fail.stderr
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: 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
10
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
13    |
14 LL | impl<T> Foo for Box<T> {
15    | ---------------------- parent `impl` is here
16 ...
17 LL |     type Ty = Vec<()>;
18    |     ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
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`
23   --> $DIR/non-defaulted-item-fail.rs:32:5
24    |
25 LL | impl<T> Foo for Box<T> {
26    | ---------------------- parent `impl` is here
27 ...
28 LL |     const CONST: u8 = 42;
29    |     ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
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`
34   --> $DIR/non-defaulted-item-fail.rs:34:5
35    |
36 LL | impl<T> Foo for Box<T> {
37    | ---------------------- parent `impl` is here
38 ...
39 LL |     fn foo(&self) -> bool { true }
40    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
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`
45   --> $DIR/non-defaulted-item-fail.rs:46:5
46    |
47 LL | impl<T> Foo for Vec<T> {}
48    | ---------------------- parent `impl` is here
49 ...
50 LL |     type Ty = Vec<()>;
51    |     ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
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`
56   --> $DIR/non-defaulted-item-fail.rs:48:5
57    |
58 LL | impl<T> Foo for Vec<T> {}
59    | ---------------------- parent `impl` is here
60 ...
61 LL |     const CONST: u8 = 42;
62    |     ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
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`
67   --> $DIR/non-defaulted-item-fail.rs:50:5
68    |
69 LL | impl<T> Foo for Vec<T> {}
70    | ---------------------- parent `impl` is here
71 ...
72 LL |     fn foo(&self) -> bool { true }
73    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
74    |
75    = note: to specialize, `foo` in the parent `impl` must be marked `default`
76
77 error: aborting due to 6 previous errors; 1 warning emitted
78
79 For more information about this error, try `rustc --explain E0520`.