mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix(ide-db): correct single-file module rename
This commit is contained in:
parent
3fe137a5b5
commit
d98c04aac1
3 changed files with 42 additions and 8 deletions
|
@ -39,6 +39,11 @@ impl Module {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_inline(self, db: &dyn HirDatabase) -> bool {
|
||||
let def_map = self.id.def_map(db.upcast());
|
||||
def_map[self.id.local_id].origin.is_inline()
|
||||
}
|
||||
|
||||
/// Returns a node which declares this module, either a `mod foo;` or a `mod foo {}`.
|
||||
/// `None` for the crate root.
|
||||
pub fn declaration_source(self, db: &dyn HirDatabase) -> Option<InFile<ast::Module>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue