aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/item_tree
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/item_tree')
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index 89ad91d37..450ef8798 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -283,7 +283,7 @@ impl Ctx {
283 let name = func.name()?.as_name(); 283 let name = func.name()?.as_name();
284 284
285 let mut params = Vec::new(); 285 let mut params = Vec::new();
286 let mut func_self_param = None; 286 let mut has_self_param = false;
287 if let Some(param_list) = func.param_list() { 287 if let Some(param_list) = func.param_list() {
288 if let Some(self_param) = param_list.self_param() { 288 if let Some(self_param) = param_list.self_param() {
289 let self_type = match self_param.ty() { 289 let self_type = match self_param.ty() {
@@ -302,10 +302,7 @@ impl Ctx {
302 } 302 }
303 }; 303 };
304 params.push(self_type); 304 params.push(self_type);
305 func_self_param = Some(SelfParam { 305 has_self_param = true;
306 is_ref: self_param.amp_token().is_some(),
307 is_mut: self_param.mut_token().is_some(),
308 });
309 } 306 }
310 for param in param_list.params() { 307 for param in param_list.params() {
311 let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty()); 308 let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty());
@@ -338,7 +335,7 @@ impl Ctx {
338 name, 335 name,
339 visibility, 336 visibility,
340 generic_params: GenericParamsId::EMPTY, 337 generic_params: GenericParamsId::EMPTY,
341 self_param: func_self_param, 338 has_self_param,
342 is_unsafe: func.unsafe_token().is_some(), 339 is_unsafe: func.unsafe_token().is_some(),
343 params: params.into_boxed_slice(), 340 params: params.into_boxed_slice(),
344 is_varargs, 341 is_varargs,