Florian Diebold
259c42f00e
Add macros for known names and paths
2019-12-13 22:33:37 +01:00
Emil Lauridsen
7705209051
Correctly infer - and ! using std::ops::{Neg,Not}
2019-12-13 12:45:38 +01:00
Emil Lauridsen
95dc2de8e9
Add helper for resolving associated type of trait in infer
2019-12-13 12:45:37 +01:00
Aleksey Kladov
d6c2b92409
Refactor parameter count tracking
2019-12-07 13:13:00 +01:00
Aleksey Kladov
8e9837df21
Remove idx and parent generics from generics
...
This makes `hir_def::GenericParams` flatter. The logic for
re-numbering the params is moved to hir instead.
2019-12-07 13:05:56 +01:00
Aleksey Kladov
30fefcc08c
Store GenericParams in arena
2019-12-07 13:05:56 +01:00
Florian Diebold
f86fe3d891
Don't unify within a reference
...
If we are expecting a `&Foo` and get a `&something`, when checking the
`something`, we are *expecting* a `Foo`, but we shouldn't try to unify whatever
we get with that expectation, because it could actually be a `&Foo`, and `&&Foo`
coerces to `&Foo`. So this fixes quite a few false type mismatches.
2019-12-06 15:15:26 +01:00
Florian Diebold
599dab5982
Extract unification code to unify module
2019-12-02 19:33:13 +01:00
oxalica
2cb684bbce
Reduce variants of Expr
2019-11-29 14:49:12 +08:00
oxalica
4992d2bf79
Infer range types
2019-11-29 03:10:16 +08:00
Aleksey Kladov
a87579500a
Move Ty
2019-11-27 21:16:00 +03:00