Use name resolution for goto definition

This commit is contained in:
Florian Diebold 2019-01-08 00:30:49 +01:00 committed by Florian Diebold
parent dc2a8d5acc
commit a6590ce231
7 changed files with 179 additions and 16 deletions

View file

@ -762,7 +762,7 @@ pub(crate) fn body_syntax_mapping(
let def = def_id.resolve(db)?;
let body_syntax_mapping = match def {
Def::Function(f) => collect_fn_body_syntax(&f.source(db)),
Def::Function(f) => collect_fn_body_syntax(&f.source(db)?.1),
// TODO: consts, etc.
_ => panic!("Trying to get body for item type without body"),
};