mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Implement glob imports from enums
This commit is contained in:
parent
35cfb418ba
commit
c1e295682e
2 changed files with 37 additions and 6 deletions
|
@ -327,7 +327,7 @@ impl Enum {
|
|||
db.enum_data(*self).name.clone()
|
||||
}
|
||||
|
||||
pub fn variants(&self, db: &impl HirDatabase) -> Vec<EnumVariant> {
|
||||
pub fn variants(&self, db: &impl PersistentHirDatabase) -> Vec<EnumVariant> {
|
||||
db.enum_data(*self)
|
||||
.variants
|
||||
.iter()
|
||||
|
@ -389,7 +389,7 @@ impl EnumVariant {
|
|||
self.parent
|
||||
}
|
||||
|
||||
pub fn name(&self, db: &impl HirDatabase) -> Option<Name> {
|
||||
pub fn name(&self, db: &impl PersistentHirDatabase) -> Option<Name> {
|
||||
db.enum_data(self.parent).variants[self.id].name.clone()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue