diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index c401528c6..c1654b069 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_syntax::ast::{self, NameOwner}; | 3 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; |
4 | 4 | ||
5 | use crate::{ | 5 | use crate::{ |
6 | Name, AsName, Function, FnSignature, | 6 | Name, AsName, Function, FnSignature, |
@@ -19,7 +19,7 @@ impl FnSignature { | |||
19 | let mut has_self_param = false; | 19 | let mut has_self_param = false; |
20 | if let Some(param_list) = node.param_list() { | 20 | if let Some(param_list) = node.param_list() { |
21 | if let Some(self_param) = param_list.self_param() { | 21 | if let Some(self_param) = param_list.self_param() { |
22 | let self_type = if let Some(type_ref) = self_param.type_ref() { | 22 | let self_type = if let Some(type_ref) = self_param.ascribed_type() { |
23 | TypeRef::from_ast(type_ref) | 23 | TypeRef::from_ast(type_ref) |
24 | } else { | 24 | } else { |
25 | let self_type = TypeRef::Path(Name::self_type().into()); | 25 | let self_type = TypeRef::Path(Name::self_type().into()); |
@@ -37,7 +37,7 @@ impl FnSignature { | |||
37 | has_self_param = true; | 37 | has_self_param = true; |
38 | } | 38 | } |
39 | for param in param_list.params() { | 39 | for param in param_list.params() { |
40 | let type_ref = TypeRef::from_ast_opt(param.type_ref()); | 40 | let type_ref = TypeRef::from_ast_opt(param.ascribed_type()); |
41 | params.push(type_ref); | 41 | params.push(type_ref); |
42 | } | 42 | } |
43 | } | 43 | } |