]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/specialization-no-default.stderr
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / 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: `#[warn(incomplete_features)]` on by default
8    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9    = help: consider using `min_specialization` instead, which is more stable and complete
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 LL | |     fn foo(&self) {}
16 LL | |     fn bar(&self) {}
17 LL | | }
18    | |_- parent `impl` is here
19 ...
20 LL |       fn foo(&self) {}
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`
26   --> $DIR/specialization-no-default.rs:23:5
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 ...
34 LL |       fn bar(&self) {}
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`
40   --> $DIR/specialization-no-default.rs:37:5
41    |
42 LL | / impl<T> Bar for T {
43 LL | |     type T = u8;
44 LL | | }
45    | |_- parent `impl` is here
46 ...
47 LL |       type T = ();
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`
53   --> $DIR/specialization-no-default.rs:55:5
54    |
55 LL | / impl<T: Clone> Baz for T {
56 LL | |     fn baz(&self) {}
57 LL | | }
58    | |_- parent `impl` is here
59 ...
60 LL |       fn baz(&self) {}
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`
66   --> $DIR/specialization-no-default.rs:74:5
67    |
68 LL | / impl<T: Clone> Redundant for T {
69 LL | |     fn redundant(&self) {}
70 LL | | }
71    | |_- parent `impl` is here
72 ...
73 LL |       default fn redundant(&self) {}
74    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
75    |
76    = note: to specialize, `redundant` in the parent `impl` must be marked `default`
77
78 error: aborting due to 5 previous errors; 1 warning emitted
79
80 For more information about this error, try `rustc --explain E0520`.