]> git.lizzy.rs Git - rust.git/commitdiff
Merge #355
authorbors[bot] <bors[bot]@users.noreply.github.com>
Sat, 29 Dec 2018 12:24:40 +0000 (12:24 +0000)
committerbors[bot] <bors[bot]@users.noreply.github.com>
Sat, 29 Dec 2018 12:24:40 +0000 (12:24 +0000)
355: Type variables / unification r=matklad a=flodiebold

This will really become necessary when we implement generics, but even now, it allows us to reason 'backwards' to infer types of expressions that we didn't understand for some reason.

This uses [ena](https://crates.io/crates/ena) to keep track of type variables.

Also turn `Ty::Tuple` from a `Vec` into an `Arc<[Ty]>` to keep `Ty` easily cloneable. Though to be honest I'm not sure how often we actually share data here, with all the make_muts and modifying...

Co-authored-by: Florian Diebold <flodiebold@gmail.com>

Trivial merge