@@ -17,7 +17,7 @@ LL | Self: Over<Color<BottomBg>, Cell<NewFg>>,
17
17
| ^^^^^ not found in this scope
18
18
19
19
error[E0412]: cannot find type `NewBg` in this scope
20
- --> $DIR/trait-selection-ice-84727.rs:32 :27
20
+ --> $DIR/trait-selection-ice-84727.rs:33 :27
21
21
|
22
22
LL | fn over(self) -> Cell<NewBg> {
23
23
| ^^^^^ not found in this scope
@@ -27,21 +27,45 @@ help: you might be missing a type parameter
27
27
LL | impl<'b, TopFg, TopBg, BottomFg, BottomBg, NewBg> Over<&Cell<BottomFg, BottomBg>, ()>
28
28
| +++++++
29
29
30
+ error[E0053]: method `over` has an incompatible type for trait
31
+ --> $DIR/trait-selection-ice-84727.rs:21:22
32
+ |
33
+ LL | impl<TopFg, TopBg, BottomFg, BottomBg, NewFg, NewBg>
34
+ | ----- ----- expected type parameter
35
+ | |
36
+ | found type parameter
37
+ ...
38
+ LL | fn over(self) -> Cell<NewFg> {
39
+ | ^^^^^^^^^^^
40
+ | |
41
+ | expected type parameter `NewBg`, found type parameter `NewFg`
42
+ | help: change the output type to match the trait: `Cell<NewFg, NewBg>`
43
+ |
44
+ note: type in trait
45
+ --> $DIR/trait-selection-ice-84727.rs:12:22
46
+ |
47
+ LL | fn over(self) -> Output;
48
+ | ^^^^^^
49
+ = note: expected signature `fn(Cell<_, _>) -> Cell<_, NewBg>`
50
+ found signature `fn(Cell<_, _>) -> Cell<_, NewFg>`
51
+ = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
52
+ = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
53
+
30
54
error[E0308]: mismatched types
31
55
--> $DIR/trait-selection-ice-84727.rs:21:22
32
56
|
33
57
LL | fn over(self) -> Cell<NewFg> {
34
58
| ---- ^^^^^^^^^^^ expected `Cell<NewFg>`, found `()`
35
59
| |
36
60
| implicitly returns `()` as its body has no tail or `return` expression
37
- LL |
61
+ ...
38
62
LL | self.over();
39
63
| - help: remove this semicolon to return this value
40
64
|
41
65
= note: expected struct `Cell<NewFg>`
42
66
found unit type `()`
43
67
44
- error: aborting due to 5 previous errors
68
+ error: aborting due to 6 previous errors
45
69
46
- Some errors have detailed explanations: E0308, E0412.
47
- For more information about an error, try `rustc --explain E0308 `.
70
+ Some errors have detailed explanations: E0053, E0308, E0412.
71
+ For more information about an error, try `rustc --explain E0053 `.
0 commit comments