aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-07 18:52:09 +0000
committerAleksey Kladov <[email protected]>2019-12-07 18:52:09 +0000
commit7d2080a0311cab62388f416beeb360695dbc5ded (patch)
tree5c3f5ff8ad9fb4cf0cc53abe8476e275525814ec /crates/ra_ide/src/references
parentd1a01aa2f8ca9eff9ba2321f2f113623742e212c (diff)
Classify name works for TypeParams
Diffstat (limited to 'crates/ra_ide/src/references')
-rw-r--r--crates/ra_ide/src/references/classify.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_ide/src/references/classify.rs b/crates/ra_ide/src/references/classify.rs
index b716d32e5..65df2e335 100644
--- a/crates/ra_ide/src/references/classify.rs
+++ b/crates/ra_ide/src/references/classify.rs
@@ -110,6 +110,15 @@ pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Opti
110 kind: NameKind::Macro(def), 110 kind: NameKind::Macro(def),
111 }) 111 })
112 }, 112 },
113 ast::TypeParam(it) => {
114 let src = name.with_value(it);
115 let def = hir::GenericParam::from_source(db, src)?;
116 Some(NameDefinition {
117 visibility: None,
118 container: def.module(db),
119 kind: NameKind::GenericParam(def),
120 })
121 },
113 _ => None, 122 _ => None,
114 } 123 }
115 } 124 }