mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
feat: allow generate_function
to generate in different local crate
This commit is contained in:
parent
943de55214
commit
bda2af71c6
4 changed files with 140 additions and 31 deletions
|
@ -489,7 +489,7 @@ impl Module {
|
|||
}
|
||||
|
||||
/// Finds nearest non-block ancestor `Module` (`self` included).
|
||||
fn nearest_non_block_module(self, db: &dyn HirDatabase) -> Module {
|
||||
pub fn nearest_non_block_module(self, db: &dyn HirDatabase) -> Module {
|
||||
let mut id = self.id;
|
||||
loop {
|
||||
let def_map = id.def_map(db.upcast());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue