mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -116,7 +116,7 @@ impl HasSource for Enum {
|
|||
impl HasSource for Variant {
|
||||
type Ast = ast::Variant;
|
||||
fn source(self, db: &dyn HirDatabase) -> Option<InFile<ast::Variant>> {
|
||||
Some(self.parent.id.child_source(db.upcast()).map(|map| map[self.id].clone()))
|
||||
Some(self.id.lookup(db.upcast()).source(db.upcast()))
|
||||
}
|
||||
}
|
||||
impl HasSource for Function {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue