This introduces the new type -- Semantics.
Semantics maps SyntaxNodes to various semantic info, such as type,
name resolution or macro expansions.
To do so, Semantics maintains a HashMap which maps every node it saw
to the file from which the node originated. This is enough to get all
the necessary hir bits just from syntax.
3260: Refactor how builtins are resolved r=matklad a=flodiebold
This fixes autocompletion suggesting e.g. `self::usize`. (I thought we had a bug for that, but I didn't find it.)
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
3228: Use proper range for hover on macro arguments r=matklad a=edwin0cheng
This PR use `original_range` to remap the range of found syntax node in `hover` and thus it should return the proper text range now.
fixed#3000fixed#3135
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3099: Init implementation of structural search replace r=matklad a=mikhail-m1
next steps:
* ignore space and other minor difference
* add support to ra_cli
* call rust parser to check pattern
* documentation
original issue #2267
Co-authored-by: Mikhail Modin <mikhailm1@gmail.com>
3108: Magic Completion for `impl Trait for` Associated Items r=matklad a=kdelorey
# Summary
This PR adds a set of magic completions to auto complete associated trait items (functions/consts/types).
![Associated Trait Impl](https://user-images.githubusercontent.com/2295721/74493144-d8f1af00-4e96-11ea-93a4-82725bf89646.gif)
## Notes
Since the assist and completion share the same logic when figuring out the associated items that are missing, a shared utility was created in the `ra_assists::utils` module.
Resolves#1046
As this is my first PR to the rust-analyzer project, I'm new to the codebase, feedback welcomed!
Co-authored-by: Kevin DeLorey <2295721+kdelorey@users.noreply.github.com>
3153: When a single test is run, do not run others with overlapping names r=matklad a=SomeoneToIgnore
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>