Use the new Resolver API for goto def

This commit is contained in:
Florian Diebold 2019-01-29 20:49:31 +01:00
parent 33ff7b56ff
commit afce8e4426
6 changed files with 89 additions and 35 deletions

View file

@ -69,6 +69,10 @@ impl Body {
pub fn owner(&self) -> Function {
self.owner
}
pub fn syntax_mapping(&self, db: &impl HirDatabase) -> Arc<BodySyntaxMapping> {
db.body_syntax_mapping(self.owner)
}
}
// needs arbitrary_self_types to be a method... or maybe move to the def?