How long ago was this? We spend a lot of time trying to make the error messages easy to follow and informative. If it wasn't that long ago, I would love to see the exact cases you had trouble with in order to improve them.
> I think I eventually got it to work by collecting it into a vector first and reversing that.
Collecting and reversing is indeed what I would do if I couldn't procure a reversible iterator (DoubleEndedIterator), but if you have one, you can write the code you wanted by spending some cost on a fat pointer by boxing the alternatives[1].
> Haven't really touched rust since. Honestly the compiler might as well just tell me to go fuck myself.
I'm sad to hear that, both because you bounced off (which is understandable) and because that experience goes counter to what we aim for. We dedicate a lot of effort on making errors not only readable, pedagogic and actionable (with varying levels of success). We really don't want the compiler to come across as antagonistic or patronizing.
[1]: https://play.rust-lang.org/?version=stable&mode=debug&editio...
Edit: For what is worth, type mismatch errors do try to give you appropriate suggestions, but in the case of two types that both implement the same trait (like the one you mention), the compiler does not look for traits that are implemented for both:
error[E0308]: `if` and `else` have incompatible types
--> file.rs:10:9
|
7 | let x = if true {
| _____________-
8 | | A
| | - expected because of this
9 | | } else {
10 | | B
| | ^ expected struct `A`, found struct `B`
11 | | };
| |_____- `if` and `else` have incompatible types
This could be done, but that has the potential to give you a lot of output for all possible traits that could satisfy this code, and in general we would be sending you in the wrong direction. When we can't be 90% sure that the suggestion is not harmful, we just "say nothing", like in this case. On a real case of the example above, you'd be more likely to want to create a new enum.