mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add completion for type aliases
This commit is contained in:
parent
dd698fc3f7
commit
546442df68
2 changed files with 45 additions and 1 deletions
|
@ -849,6 +849,10 @@ impl TypeAlias {
|
|||
db.type_alias_data(self).type_ref.clone()
|
||||
}
|
||||
|
||||
pub fn ty(self, db: &impl HirDatabase) -> Ty {
|
||||
db.type_for_def(self.into(), Namespace::Types)
|
||||
}
|
||||
|
||||
pub fn name(self, db: &impl DefDatabase) -> Name {
|
||||
db.type_alias_data(self).name.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue