]> git.lizzy.rs Git - rust.git/blob - tests/ui/specialization/specialization-no-default.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / specialization / specialization-no-default.stderr
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: 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]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
12   --> $DIR/specialization-no-default.rs:20:5
13    |
14 LL | impl<T> Foo for T {
15    | ----------------- parent `impl` is here
16 ...
17 LL |     fn foo(&self) {}
18    |     ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
19    |
20    = note: to specialize, `foo` in the parent `impl` must be marked `default`
21
22 error[E0520]: `bar` specializes an item from a parent `impl`, but that item is not marked `default`
23   --> $DIR/specialization-no-default.rs:23:5
24    |
25 LL | impl<T> Foo for T {
26    | ----------------- parent `impl` is here
27 ...
28 LL |     fn bar(&self) {}
29    |     ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
30    |
31    = note: to specialize, `bar` in the parent `impl` must be marked `default`
32
33 error[E0520]: `T` specializes an item from a parent `impl`, but that item is not marked `default`
34   --> $DIR/specialization-no-default.rs:37:5
35    |
36 LL | impl<T> Bar for T {
37    | ----------------- parent `impl` is here
38 ...
39 LL |     type T = ();
40    |     ^^^^^^^^^^^^ cannot specialize default item `T`
41    |
42    = note: to specialize, `T` in the parent `impl` must be marked `default`
43
44 error[E0520]: `baz` specializes an item from a parent `impl`, but that item is not marked `default`
45   --> $DIR/specialization-no-default.rs:55:5
46    |
47 LL | impl<T: Clone> Baz for T {
48    | ------------------------ parent `impl` is here
49 ...
50 LL |     fn baz(&self) {}
51    |     ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
52    |
53    = note: to specialize, `baz` in the parent `impl` must be marked `default`
54
55 error[E0520]: `redundant` specializes an item from a parent `impl`, but that item is not marked `default`
56   --> $DIR/specialization-no-default.rs:74:5
57    |
58 LL | impl<T: Clone> Redundant for T {
59    | ------------------------------ parent `impl` is here
60 ...
61 LL |     default fn redundant(&self) {}
62    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
63    |
64    = note: to specialize, `redundant` in the parent `impl` must be marked `default`
65
66 error: aborting due to 5 previous errors; 1 warning emitted
67
68 For more information about this error, try `rustc --explain E0520`.