@@ -8,61 +8,20 @@ LL | #![feature(specialization)]
8
8
= help: consider using `min_specialization` instead, which is more stable and complete
9
9
= note: `#[warn(incomplete_features)]` on by default
10
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
11
+ error[E0391 ]: cycle detected when computing whether impls specialize one another
12
+ --> $DIR/specialization-no-default.rs:46:1
13
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`
14
+ LL | default impl<T> Baz for T {
15
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
19
16
|
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 | fn redundant(&self) {}
62
- | ^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
17
+ = note: ...which immediately requires computing whether impls specialize one another again
18
+ note: cycle used when building specialization graph of trait `Baz`
19
+ --> $DIR/specialization-no-default.rs:42:1
63
20
|
64
- = note: to specialize, `redundant` in the parent `impl` must be marked `default`
21
+ LL | trait Baz {
22
+ | ^^^^^^^^^
23
+ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
65
24
66
- error: aborting due to 5 previous errors ; 1 warning emitted
25
+ error: aborting due to previous error ; 1 warning emitted
67
26
68
- For more information about this error, try `rustc --explain E0520 `.
27
+ For more information about this error, try `rustc --explain E0391 `.
0 commit comments