diff options
author | Marcus Klaas de Vries <[email protected]> | 2019-01-26 11:06:41 +0000 |
---|---|---|
committer | Marcus Klaas de Vries <[email protected]> | 2019-01-27 16:59:21 +0000 |
commit | 089b1c57c1774eb1aacec53828ce2d2648adff2d (patch) | |
tree | ba098a1ef9cfc82271a9abcc0eb022b40739a3d9 /crates/ra_hir/src/code_model_api.rs | |
parent | 04748a0f16624a1893c1da28a35ca3e220c81fce (diff) |
Address some issues flagged in review
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index a13da58d2..e4008058c 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -388,8 +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) params: Vec<TypeRef>, |
392 | pub(crate) args: Vec<TypeRef>, | ||
393 | pub(crate) ret_type: TypeRef, | 392 | pub(crate) ret_type: TypeRef, |
394 | /// True if the first param is `self`. This is relevant to decide whether this | 393 | /// True if the first param is `self`. This is relevant to decide whether this |
395 | /// can be called as a method. | 394 | /// can be called as a method. |
@@ -401,8 +400,8 @@ impl FnSignature { | |||
401 | &self.name | 400 | &self.name |
402 | } | 401 | } |
403 | 402 | ||
404 | pub fn args(&self) -> &[TypeRef] { | 403 | pub fn params(&self) -> &[TypeRef] { |
405 | &self.args | 404 | &self.params |
406 | } | 405 | } |
407 | 406 | ||
408 | pub fn ret_type(&self) -> &TypeRef { | 407 | pub fn ret_type(&self) -> &TypeRef { |
@@ -414,10 +413,6 @@ impl FnSignature { | |||
414 | pub fn has_self_param(&self) -> bool { | 413 | pub fn has_self_param(&self) -> bool { |
415 | self.has_self_param | 414 | self.has_self_param |
416 | } | 415 | } |
417 | |||
418 | pub fn generics(&self) -> &GenericParams { | ||
419 | &self.type_params | ||
420 | } | ||
421 | } | 416 | } |
422 | 417 | ||
423 | impl Function { | 418 | impl Function { |