diff options
author | Aleksey Kladov <[email protected]> | 2020-02-06 16:42:17 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-06 16:42:17 +0000 |
commit | d1e8b8d134da802eecef5cbcd5486bd542ad75b5 (patch) | |
tree | 8da32b9af06851c2d2bc0d815f9d6dbccba2e90f /crates/ra_ide_db | |
parent | ad204f7562747150c4f570d7ce648f2539530b76 (diff) |
Fix tests
Diffstat (limited to 'crates/ra_ide_db')
-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)) |