Having used a slew of other languages, have to say I'm often impressed with the Rust compiler. It's invaluable navigating some of the stickier areas of the language. When I can't make sense of the errors the first course of action is simplifying the code (e.g. breaking down into more statements, reducing indirection, etc.) to get sensible feedback.
Unrelated but in the same vein was something I originally read in an F# article of "using the types to guide you" when looking for solutions. Can't find it now but it was essentially talking about if you need A -> B[] then function prototypes like F(A) -> B and B -> B[] get you there. It's essential in languages with more extreme type inference than Rust, but the general concept is helpful.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Having used a slew of other languages, have to say I'm often impressed with the Rust compiler. It's invaluable navigating some of the stickier areas of the language. When I can't make sense of the errors the first course of action is simplifying the code (e.g. breaking down into more statements, reducing indirection, etc.) to get sensible feedback.
Unrelated but in the same vein was something I originally read in an F# article of "using the types to guide you" when looking for solutions. Can't find it now but it was essentially talking about if you need
A -> B[]
then function prototypes likeF(A) -> B
andB -> B[]
get you there. It's essential in languages with more extreme type inference than Rust, but the general concept is helpful.