Add type params to FnSignature

This commit is contained in:
Marcus Klaas de Vries
2019-01-26 00:30:56 +01:00
parent 67e40e431a
commit aa06893a14
9 changed files with 106 additions and 136 deletions

View File

@@ -58,6 +58,7 @@ impl FnSignature {
args.push(type_ref);
}
}
let type_params = db.generic_params(func.into());
let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) {
TypeRef::from_ast(type_ref)
} else {
@@ -66,6 +67,7 @@ impl FnSignature {
let sig = FnSignature {
name,
type_params,
args,
ret_type,
has_self_param,