aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/generics.rs')
-rw-r--r--crates/hir_def/src/generics.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/hir_def/src/generics.rs b/crates/hir_def/src/generics.rs
index 0f04b2bae..096ac7968 100644
--- a/crates/hir_def/src/generics.rs
+++ b/crates/hir_def/src/generics.rs
@@ -104,7 +104,7 @@ impl GenericParams {
104 ) -> Interned<GenericParams> { 104 ) -> Interned<GenericParams> {
105 let _p = profile::span("generic_params_query"); 105 let _p = profile::span("generic_params_query");
106 106
107 let generics = match def { 107 match def {
108 GenericDefId::FunctionId(id) => { 108 GenericDefId::FunctionId(id) => {
109 let id = id.lookup(db).id; 109 let id = id.lookup(db).id;
110 let tree = id.item_tree(db); 110 let tree = id.item_tree(db);
@@ -150,8 +150,7 @@ impl GenericParams {
150 GenericDefId::EnumVariantId(_) | GenericDefId::ConstId(_) => { 150 GenericDefId::EnumVariantId(_) | GenericDefId::ConstId(_) => {
151 Interned::new(GenericParams::default()) 151 Interned::new(GenericParams::default())
152 } 152 }
153 }; 153 }
154 generics
155 } 154 }
156 155
157 fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) { 156 fn new(db: &dyn DefDatabase, def: GenericDefId) -> (GenericParams, InFile<SourceMap>) {