aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r--crates/ra_hir_def/src/data.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 921253c42..51c97c584 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -40,7 +40,7 @@ impl FunctionData {
40 name: func.name.clone(), 40 name: func.name.clone(),
41 params: func.params.clone(), 41 params: func.params.clone(),
42 ret_type: func.ret_type.clone(), 42 ret_type: func.ret_type.clone(),
43 attrs: func.attrs.clone(), 43 attrs: item_tree.attrs(loc.id.value.into()).clone(),
44 has_self_param: func.has_self_param, 44 has_self_param: func.has_self_param,
45 is_unsafe: func.is_unsafe, 45 is_unsafe: func.is_unsafe,
46 visibility: func.visibility.clone(), 46 visibility: func.visibility.clone(),
@@ -224,7 +224,8 @@ fn collect_items(
224 match item { 224 match item {
225 AssocItem::Function(id) => { 225 AssocItem::Function(id) => {
226 let item = &item_tree[id]; 226 let item = &item_tree[id];
227 if !item.attrs.is_cfg_enabled(&cfg_options) { 227 let attrs = item_tree.attrs(id.into());
228 if !attrs.is_cfg_enabled(&cfg_options) {
228 continue; 229 continue;
229 } 230 }
230 let def = FunctionLoc { container, id: ItemTreeId::new(file_id, id) }.intern(db); 231 let def = FunctionLoc { container, id: ItemTreeId::new(file_id, id) }.intern(db);