aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/resolve.rs12
2 files changed, 10 insertions, 4 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 39b01d510..3c891547e 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -1070,7 +1070,7 @@ pub struct ImplBlock {
1070pub enum ScopeDef { 1070pub enum ScopeDef {
1071 ModuleDef(ModuleDef), 1071 ModuleDef(ModuleDef),
1072 MacroDef(MacroDef), 1072 MacroDef(MacroDef),
1073 GenericParam(u32), 1073 GenericParam(GenericParam),
1074 ImplSelfType(ImplBlock), 1074 ImplSelfType(ImplBlock),
1075 AdtSelfType(Adt), 1075 AdtSelfType(Adt),
1076 Local(Local), 1076 Local(Local),
diff --git a/crates/ra_hir/src/resolve.rs b/crates/ra_hir/src/resolve.rs
index 5e04ca9b6..a029513b5 100644
--- a/crates/ra_hir/src/resolve.rs
+++ b/crates/ra_hir/src/resolve.rs
@@ -19,7 +19,7 @@ use crate::{
19 code_model::Crate, 19 code_model::Crate,
20 db::HirDatabase, 20 db::HirDatabase,
21 expr::{ExprScopes, PatId, ScopeId}, 21 expr::{ExprScopes, PatId, ScopeId},
22 DefWithBody, GenericDef, Local, MacroDef, PerNs, ScopeDef, 22 DefWithBody, GenericDef, GenericParam, Local, MacroDef, PerNs, ScopeDef,
23}; 23};
24 24
25#[derive(Debug, Clone, Default)] 25#[derive(Debug, Clone, Default)]
@@ -447,9 +447,15 @@ impl Scope {
447 }); 447 });
448 } 448 }
449 } 449 }
450 Scope::GenericParams { params, .. } => { 450 Scope::GenericParams { params, def } => {
451 for param in params.params.iter() { 451 for param in params.params.iter() {
452 f(param.name.clone(), ScopeDef::GenericParam(param.idx)) 452 f(
453 param.name.clone(),
454 ScopeDef::GenericParam(GenericParam {
455 parent: (*def).into(),
456 idx: param.idx,
457 }),
458 )
453 } 459 }
454 } 460 }
455 Scope::ImplBlockScope(i) => { 461 Scope::ImplBlockScope(i) => {