]> git.proxmox.com Git - rustc.git/blame - src/test/ui/specialization/defaultimpl/specialization-no-default.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / specialization / defaultimpl / specialization-no-default.stderr
CommitLineData
f035d41b
XL
1warning: 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 |
4LL | #![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
29967ef6 9 = help: consider using `min_specialization` instead, which is more stable and complete
f035d41b 10
b7449926 11error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
e1599b0c 12 --> $DIR/specialization-no-default.rs:20:5
b7449926
XL
13 |
14LL | / impl<T> Foo for T {
15LL | | fn foo(&self) {}
16LL | | fn bar(&self) {}
17LL | | }
18 | |_- parent `impl` is here
19...
532ac7d7 20LL | fn foo(&self) {}
b7449926
XL
21 | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
22 |
23 = note: to specialize, `foo` in the parent `impl` must be marked `default`
24
25error[E0520]: `bar` specializes an item from a parent `impl`, but that item is not marked `default`
e1599b0c 26 --> $DIR/specialization-no-default.rs:23:5
b7449926
XL
27 |
28LL | / impl<T> Foo for T {
29LL | | fn foo(&self) {}
30LL | | fn bar(&self) {}
31LL | | }
32 | |_- parent `impl` is here
33...
532ac7d7 34LL | fn bar(&self) {}
b7449926
XL
35 | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
36 |
37 = note: to specialize, `bar` in the parent `impl` must be marked `default`
38
39error[E0520]: `T` specializes an item from a parent `impl`, but that item is not marked `default`
e1599b0c 40 --> $DIR/specialization-no-default.rs:37:5
b7449926
XL
41 |
42LL | / impl<T> Bar for T {
43LL | | type T = u8;
44LL | | }
45 | |_- parent `impl` is here
46...
532ac7d7 47LL | type T = ();
b7449926
XL
48 | ^^^^^^^^^^^^ cannot specialize default item `T`
49 |
50 = note: to specialize, `T` in the parent `impl` must be marked `default`
51
52error[E0520]: `baz` specializes an item from a parent `impl`, but that item is not marked `default`
e1599b0c 53 --> $DIR/specialization-no-default.rs:55:5
b7449926
XL
54 |
55LL | / impl<T: Clone> Baz for T {
56LL | | fn baz(&self) {}
57LL | | }
58 | |_- parent `impl` is here
59...
532ac7d7 60LL | fn baz(&self) {}
b7449926
XL
61 | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
62 |
63 = note: to specialize, `baz` in the parent `impl` must be marked `default`
64
65error[E0520]: `redundant` specializes an item from a parent `impl`, but that item is not marked `default`
e1599b0c 66 --> $DIR/specialization-no-default.rs:74:5
b7449926
XL
67 |
68LL | / impl<T: Clone> Redundant for T {
69LL | | fn redundant(&self) {}
70LL | | }
71 | |_- parent `impl` is here
72...
532ac7d7 73LL | fn redundant(&self) {}
b7449926
XL
74 | ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
75 |
76 = note: to specialize, `redundant` in the parent `impl` must be marked `default`
77
f035d41b 78error: aborting due to 5 previous errors; 1 warning emitted
b7449926
XL
79
80For more information about this error, try `rustc --explain E0520`.