mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Eagerly lower enum variants in CrateDefMap construction
This commit is contained in:
parent
9d8889cdfc
commit
d80d2fcae0
49 changed files with 553 additions and 593 deletions
|
@ -262,9 +262,7 @@ impl<'a> SymbolCollector<'a> {
|
|||
DefWithBodyId::FunctionId(id) => Some(self.db.function_data(id).name.to_smol_str()),
|
||||
DefWithBodyId::StaticId(id) => Some(self.db.static_data(id).name.to_smol_str()),
|
||||
DefWithBodyId::ConstId(id) => Some(self.db.const_data(id).name.as_ref()?.to_smol_str()),
|
||||
DefWithBodyId::VariantId(id) => {
|
||||
Some(self.db.enum_data(id.parent).variants[id.local_id].name.to_smol_str())
|
||||
}
|
||||
DefWithBodyId::VariantId(id) => Some(self.db.enum_variant_data(id).name.to_smol_str()),
|
||||
DefWithBodyId::InTypeConstId(_) => Some("in type const".into()),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue