How does Rust’s type inference work across multiple statements?

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?”

Leave a Comment