internal: Add Definition::Crate

This is its own thing so it should be handled specifically where possible
This commit is contained in:
Lukas Wirth 2025-01-10 10:45:44 +01:00
parent 32b86a8378
commit e6270bd378
23 changed files with 184 additions and 133 deletions

View file

@ -134,6 +134,7 @@ impl Definition {
FieldSource::Pos(_) => None,
}
}
Definition::Crate(_) => None,
Definition::Module(module) => {
let src = module.declaration_source(sema.db)?;
let name = src.value.name()?;