diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index defb9fd0a..a13da58d2 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -388,6 +388,7 @@ pub use crate::code_model_impl::function::ScopeEntryWithSyntax; | |||
388 | #[derive(Debug, Clone, PartialEq, Eq)] | 388 | #[derive(Debug, Clone, PartialEq, Eq)] |
389 | pub struct FnSignature { | 389 | pub struct FnSignature { |
390 | pub(crate) name: Name, | 390 | pub(crate) name: Name, |
391 | pub(crate) type_params: Arc<GenericParams>, | ||
391 | pub(crate) args: Vec<TypeRef>, | 392 | pub(crate) args: Vec<TypeRef>, |
392 | pub(crate) ret_type: TypeRef, | 393 | pub(crate) ret_type: TypeRef, |
393 | /// True if the first param is `self`. This is relevant to decide whether this | 394 | /// True if the first param is `self`. This is relevant to decide whether this |
@@ -413,6 +414,10 @@ impl FnSignature { | |||
413 | pub fn has_self_param(&self) -> bool { | 414 | pub fn has_self_param(&self) -> bool { |
414 | self.has_self_param | 415 | self.has_self_param |
415 | } | 416 | } |
417 | |||
418 | pub fn generics(&self) -> &GenericParams { | ||
419 | &self.type_params | ||
420 | } | ||
416 | } | 421 | } |
417 | 422 | ||
418 | impl Function { | 423 | impl Function { |