Rust performs type inference in fairly advanced situations. Could someone please explain (or point to) the rules that describe what can and cannot be inferred?
The f
Rust uses Hindley-Milner type system. It is a set of rules about establishing types of expressions based on their usage.
Formal description and explanation for it can be found there:
"What part of Hindley-Milner do you not understand?"