460: Name resolution fixes r=flodiebold a=flodiebold
Found two problems:
- use tree desugaring lost the prefix if the path had just one segment (e.g. in `use foo::{bar, baz}`)
- when resolving imports across source roots, it actually used the name of the segment from the other source root... so e.g. in `use ra_syntax::foo` it'd map `ra_syntax` to the import instead of `foo` 😄
Both of these are one-line fixes, most of this is making it possible to write tests with multiple source roots.
I also left in debug logs for the name resolution, in case it turns out there's still more to fix ;)
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
455: Import fixpoint loop for name resolution r=matklad a=flodiebold
This implements reexports, so only the glob import part of #231 remains.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
451: More type inference for more binary expressions r=flodiebold a=marcusklaas
Implements more of https://github.com/rust-analyzer/rust-analyzer/issues/390. Just works for primitive (numeric) types for now.
Found an issue where `let x: Ty = expr;` doesn't actually propagate the type information unless `Ty` is primitive and numeric. I'll open an issue for this.
Co-authored-by: Marcus Klaas de Vries <mail@marcusklaas.nl>
450: Implement autoderef for field accesses r=matklad a=flodiebold
Which means we now get completion for fields e.g. in `&self` methods :)
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
442: WIP: indent on typing dot r=matklad a=simonvandel
Fixes#439.
The unit test passes, but I can't seem to make VS code perform the action. The existing action on "=" doesn't work either on my end either though.
I didn't add any smart way of detecting the current indent level. Any ideas how I would do that?
Co-authored-by: Simon Vandel Sillesen <simon.vandel@gmail.com>
446: Use HIR Expr for type inference r=flodiebold a=flodiebold
Now we can reuse the type inference inside a function when typing whitespace etc. :)
The order of the lines in the type tests changed a bit, which I'm not sure why, but there are no actual changes in the inference results.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>