]> git.proxmox.com Git - rustc.git/blame - tests/ui/specialization/non-defaulted-item-fail.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / specialization / non-defaulted-item-fail.stderr
CommitLineData
f035d41b
XL
1warning: 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 |
4LL | #![feature(specialization, associated_type_defaults)]
5 | ^^^^^^^^^^^^^^
6 |
f035d41b 7 = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
29967ef6 8 = help: consider using `min_specialization` instead, which is more stable and complete
2b03887a 9 = note: `#[warn(incomplete_features)]` on by default
f035d41b 10
e74abb32 11error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 12 --> $DIR/non-defaulted-item-fail.rs:30:5
e74abb32 13 |
064997fb
FG
14LL | impl<T> Foo for Box<T> {
15 | ---------------------- parent `impl` is here
e74abb32 16...
064997fb 17LL | type Ty = Vec<()>;
9ffffee4 18 | ^^^^^^^ cannot specialize default item `Ty`
e74abb32
XL
19 |
20 = note: to specialize, `Ty` in the parent `impl` must be marked `default`
21
22error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 23 --> $DIR/non-defaulted-item-fail.rs:32:5
e74abb32 24 |
064997fb
FG
25LL | impl<T> Foo for Box<T> {
26 | ---------------------- parent `impl` is here
e74abb32 27...
064997fb 28LL | const CONST: u8 = 42;
9ffffee4 29 | ^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
e74abb32
XL
30 |
31 = note: to specialize, `CONST` in the parent `impl` must be marked `default`
32
33error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 34 --> $DIR/non-defaulted-item-fail.rs:34:5
e74abb32 35 |
064997fb
FG
36LL | impl<T> Foo for Box<T> {
37 | ---------------------- parent `impl` is here
e74abb32 38...
064997fb 39LL | fn foo(&self) -> bool { true }
9ffffee4 40 | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
e74abb32
XL
41 |
42 = note: to specialize, `foo` in the parent `impl` must be marked `default`
43
44error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 45 --> $DIR/non-defaulted-item-fail.rs:46:5
e74abb32
XL
46 |
47LL | impl<T> Foo for Vec<T> {}
064997fb 48 | ---------------------- parent `impl` is here
e74abb32
XL
49...
50LL | type Ty = Vec<()>;
9ffffee4 51 | ^^^^^^^ cannot specialize default item `Ty`
e74abb32
XL
52 |
53 = note: to specialize, `Ty` in the parent `impl` must be marked `default`
54
55error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 56 --> $DIR/non-defaulted-item-fail.rs:48:5
e74abb32
XL
57 |
58LL | impl<T> Foo for Vec<T> {}
064997fb 59 | ---------------------- parent `impl` is here
e74abb32
XL
60...
61LL | const CONST: u8 = 42;
9ffffee4 62 | ^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
e74abb32
XL
63 |
64 = note: to specialize, `CONST` in the parent `impl` must be marked `default`
65
66error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
f035d41b 67 --> $DIR/non-defaulted-item-fail.rs:50:5
e74abb32
XL
68 |
69LL | impl<T> Foo for Vec<T> {}
064997fb 70 | ---------------------- parent `impl` is here
e74abb32
XL
71...
72LL | fn foo(&self) -> bool { true }
9ffffee4 73 | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
e74abb32
XL
74 |
75 = note: to specialize, `foo` in the parent `impl` must be marked `default`
76
f035d41b 77error: aborting due to 6 previous errors; 1 warning emitted
e74abb32
XL
78
79For more information about this error, try `rustc --explain E0520`.