892: Type aliases r=matklad a=flodiebold
This implements type aliases (i.e. `type` definitions).
There's just one snag: handling recursion. E.g. `type Foo = Foo` makes type inference panic with a query cycle. I think the best way to handle this would be if Salsa provided the ability to catch cycle errors? It seems that there's some work underway to support this [here](https://github.com/salsa-rs/salsa/issues/6) and [here](https://github.com/salsa-rs/salsa/pull/147). Should we wait for this? I don't see a good way to handle this without help from Salsa.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
893: Completion presentation r=matklad a=matklad
Just moves completion code around a bit, to keep logic for producing completions and logic for rendering them into completion items separate.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
889: Refactor assits r=matklad a=matklad
* assign unique IDs to assists so that clients could do custom stuff
* specify kinds for assists,
* make introduce_variable a `refactoring.extract` and make it available only when expression is selected
* introduce marks to assists
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
885: Parse token trees directy r=matklad a=matklad
This takes advantage of the recent macro refactoring to directly parse token stream into a syntax tree.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
886: Associated method generics r=matklad a=flodiebold
Refactor associated method resolution a bit and make it work with generics.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
884: Split ty.rs into several modules r=matklad a=flodiebold
It was just getting too big. We now have:
- ty: the `Ty` enum and helpers
- ty::infer: actual type inference
- ty::lower: lowering from HIR to `Ty`
- ty::op: helpers for binary operations, currently
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
It was just getting too big. We now have:
- ty: the `Ty` enum and helpers
- ty::infer: actual type inference
- ty::lower: lowering from HIR to `Ty`
- ty::op: helpers for binary operations, currently