diff options
Diffstat (limited to 'crates/ra_ide_db/src/defs.rs')
-rw-r--r-- | crates/ra_ide_db/src/defs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index cee6dde8e..788906723 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs | |||
@@ -92,7 +92,7 @@ pub fn classify_name( | |||
92 | ast::FnDef(it) => { | 92 | ast::FnDef(it) => { |
93 | let src = name.with_value(it); | 93 | let src = name.with_value(it); |
94 | let def: hir::Function = sb.to_def(src)?; | 94 | let def: hir::Function = sb.to_def(src)?; |
95 | if parent.parent().and_then(ast::ItemList::cast).is_some() { | 95 | if parent.parent().and_then(ast::ItemList::cast).map_or(false, |it| it.syntax().parent().and_then(ast::Module::cast).is_none()) { |
96 | Some(from_assoc_item(sb.db, def.into())) | 96 | Some(from_assoc_item(sb.db, def.into())) |
97 | } else { | 97 | } else { |
98 | Some(from_module_def(sb.db, def.into(), None)) | 98 | Some(from_module_def(sb.db, def.into(), None)) |