mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Complete associated methods on enums (and unions) as well
This commit is contained in:
parent
64f71dd3ff
commit
d37f960dfa
4 changed files with 91 additions and 6 deletions
|
@ -390,6 +390,10 @@ impl Union {
|
|||
self.id.module(db)
|
||||
}
|
||||
|
||||
pub fn ty(self, db: &impl HirDatabase) -> Ty {
|
||||
db.type_for_def(self.into(), Namespace::Types)
|
||||
}
|
||||
|
||||
// FIXME move to a more general type
|
||||
/// Builds a resolver for type references inside this union.
|
||||
pub(crate) fn resolver(self, db: &impl HirDatabase) -> Resolver {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue