rust-analyzer/crates/ide-assists/src
bors d8feb908be Auto merge of #16703 - regexident:sema-ast-to-hir, r=Veykril
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)
2024-03-04 09:02:32 +00:00
..
handlers Auto merge of #16703 - regexident:sema-ast-to-hir, r=Veykril 2024-03-04 09:02:32 +00:00
tests Add destructure_struct_binding action 2024-02-29 13:17:44 +00:00
utils Attempt resolving name collisions 2024-02-29 13:17:45 +00:00
assist_config.rs Add config for preferring / ignoring prelude modules in find_path 2023-11-11 14:56:38 +01:00
assist_context.rs Import serde derives on converting json to struct 2022-08-06 20:12:21 +04:30
lib.rs Add destructure_struct_binding action 2024-02-29 13:17:44 +00:00
tests.rs ide-assists: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
utils.rs Handle bindings to refs 2024-02-29 13:17:45 +00:00