@@ -17,7 +17,7 @@ LL | Self: Over<Color<BottomBg>, Cell<NewFg>>,
1717 | ^^^^^ not found in this scope
1818
1919error[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
2121 |
2222LL | fn over(self) -> Cell<NewBg> {
2323 | ^^^^^ not found in this scope
@@ -27,21 +27,45 @@ help: you might be missing a type parameter
2727LL | impl<'b, TopFg, TopBg, BottomFg, BottomBg, NewBg> Over<&Cell<BottomFg, BottomBg>, ()>
2828 | +++++++
2929
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+
3054error[E0308]: mismatched types
3155 --> $DIR/trait-selection-ice-84727.rs:21:22
3256 |
3357LL | fn over(self) -> Cell<NewFg> {
3458 | ---- ^^^^^^^^^^^ expected `Cell<NewFg>`, found `()`
3559 | |
3660 | implicitly returns `()` as its body has no tail or `return` expression
37- LL |
61+ ...
3862LL | self.over();
3963 | - help: remove this semicolon to return this value
4064 |
4165 = note: expected struct `Cell<NewFg>`
4266 found unit type `()`
4367
44- error: aborting due to 5 previous errors
68+ error: aborting due to 6 previous errors
4569
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