mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Support for nested ADT
This commit is contained in:
parent
94ad07af4b
commit
ac5a3f611b
5 changed files with 35 additions and 22 deletions
|
@ -697,8 +697,8 @@ impl CallableDef {
|
|||
pub fn krate(self, db: &impl HirDatabase) -> CrateId {
|
||||
match self {
|
||||
CallableDef::FunctionId(f) => f.lookup(db).module(db),
|
||||
CallableDef::StructId(s) => s.lookup(db).container,
|
||||
CallableDef::EnumVariantId(e) => e.parent.lookup(db).container,
|
||||
CallableDef::StructId(s) => s.lookup(db).container.module(db),
|
||||
CallableDef::EnumVariantId(e) => e.parent.lookup(db).container.module(db),
|
||||
}
|
||||
.krate
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue