Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index f676a700cc..418e59d064 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2737,14 +2737,14 @@ impl<'db> Param<'db> { Callee::Def(CallableDefId::FunctionId(it)) => { let parent = DefWithBodyId::FunctionId(it); let body = Body::of(db, parent); - if let Some(self_param) = body.self_param().filter(|_| self.idx == 0) { + if let Some(self_param) = body.self_param.filter(|_| self.idx == 0) { Some(Local { parent: parent.into(), parent_infer: parent.into(), - binding_id: self_param, + binding_id: self_param.user_written, }) } else if let Pat::Bind { id, .. } = - &body[body.params[self.idx - body.self_param().is_some() as usize]] + &body[body.params[self.idx - body.self_param.is_some() as usize].user_written] { Some(Local { parent: parent.into(), @@ -4193,7 +4193,7 @@ impl Local { } ExpressionStoreOwnerId::Body(def_with_body_id) => { b = Body::with_source_map(db, def_with_body_id); - if b.0.self_params.contains(&self.binding_id) + if b.0.is_any_self_param(self.binding_id) && let Some(source) = b.1.self_param_syntax() { let root = source.file_syntax(db); @@ -4234,7 +4234,7 @@ impl Local { } ExpressionStoreOwnerId::Body(def_with_body_id) => { b = Body::with_source_map(db, def_with_body_id); - if b.0.self_params.contains(&self.binding_id) + if b.0.is_any_self_param(self.binding_id) && let Some(source) = b.1.self_param_syntax() { let root = source.file_syntax(db); |