aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_impl
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-25 23:30:56 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-27 16:59:21 +0000
commitaa06893a1493770f8009d098a5340f1a9ba13dec (patch)
treeaebdb8ce81e007be4c45ee7b051df97e9ecb8280 /crates/ra_hir/src/code_model_impl
parent67e40e431aa966a76b6a247b19505e22b620a0c7 (diff)
Add type params to FnSignature
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r--crates/ra_hir/src/code_model_impl/function.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs
index b4aa18540..f4beab6ae 100644
--- a/crates/ra_hir/src/code_model_impl/function.rs
+++ b/crates/ra_hir/src/code_model_impl/function.rs
@@ -58,6 +58,7 @@ impl FnSignature {
58 args.push(type_ref); 58 args.push(type_ref);
59 } 59 }
60 } 60 }
61 let type_params = db.generic_params(func.into());
61 let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) { 62 let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) {
62 TypeRef::from_ast(type_ref) 63 TypeRef::from_ast(type_ref)
63 } else { 64 } else {
@@ -66,6 +67,7 @@ impl FnSignature {
66 67
67 let sig = FnSignature { 68 let sig = FnSignature {
68 name, 69 name,
70 type_params,
69 args, 71 args,
70 ret_type, 72 ret_type,
71 has_self_param, 73 has_self_param,