Add more methods for resolving definitions from AST to their corresponding HIR types
In order to be able to add these methods with consistent naming I had to also rename two existing methods that would otherwise be conflicting/confusing:
Semantics::to_module_def(&self, file: FileId) -> Option<Module> (before)
Semantics::file_to_module_def(&self, file: FileId) -> Option<Module> (after)
Semantics::to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module> (before)
Semantics::file_to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module> (after)
(the PR is motivated by an outside use of the ra_ap_hir crate that would benefit from being able to walk a hir::Function's AST, resolving its exprs/stmts/items to their HIR equivalents)
@bors r+
@bors r+
@bors r+
@bors r+
Bots having a moment? 😅
bors is always having a moment
@bors r+
:pushpin: Commit fac8a14de874d36aed74e3e29022342f77b0c01d has been approved by Veykril
It is now in the queue for this repository.
:hourglass: Testing commit fac8a14de874d36aed74e3e29022342f77b0c01d with merge d8feb908beb9585645891bf06233d15ec4857cc1...
:sunny: Test successful - checks-actions Approved by: Veykril Pushing d8feb908beb9585645891bf06233d15ec4857cc1 to master...