968: Macro aware name resoltion r=matklad a=matklad
The first commit lays the ground work for new name resolution, including
* extracting position-indendent items from parse trees
* walking the tree of modules
* old-style macro_rules resolve
cc @pnkfelix: this looks like an API name resolution should interact with.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
947: Add missing impl members r=matklad a=Xanewok
Closes#878.
This took longer than expected as I wrapped my head around the API and the project - hopefully I didn't miss any edge case here.
r? @matklad
Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
Asymptotically computing a set difference is faster but in the average
case we won't have more than ~10 functions. Also prefer not using hash
sets as these may yield nondeterministic results.
Implement `BindingMode` for pattern matching, so that types can be
correctly inferred using match ergonomics. The binding mode defaults to
`Move` (referred to as 'BindingMode::BindByValue` in rustc), and is
updated by automatic dereferencing of the value being matched.
981: Remove FnSig from FnDef type r=matklad a=flodiebold
It doesn't need to be in there since it's just information from the def. Another
step towards aligning Ty with Chalk's representation.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
976: Replace Display by a pretty printing trait for Ty r=matklad a=flodiebold
This allows removing the names from Adt and FnDef (and more later), as a first
step towards aligning more with chalk's Ty :)
I may have gone a bit overboard with the definition of the PrettyPrint trait...
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
973: derive Hash for ra_hir::ModuleDef r=matklad a=pcpthm
I wanted to use `HashSet` but it seems like `Hash` derive is missing for no reason.
Co-authored-by: pcpthm <pcpthm@gmail.com>