diff options
Diffstat (limited to 'crates/hir_def/src/body/tests.rs')
-rw-r--r-- | crates/hir_def/src/body/tests.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs index 27d837d47..673a75386 100644 --- a/crates/hir_def/src/body/tests.rs +++ b/crates/hir_def/src/body/tests.rs | |||
@@ -15,12 +15,9 @@ fn lower(ra_fixture: &str) -> Arc<Body> { | |||
15 | let mut fn_def = None; | 15 | let mut fn_def = None; |
16 | 'outer: for (_, module) in def_map.modules() { | 16 | 'outer: for (_, module) in def_map.modules() { |
17 | for decl in module.scope.declarations() { | 17 | for decl in module.scope.declarations() { |
18 | match decl { | 18 | if let ModuleDefId::FunctionId(it) = decl { |
19 | ModuleDefId::FunctionId(it) => { | 19 | fn_def = Some(it); |
20 | fn_def = Some(it); | 20 | break 'outer; |
21 | break 'outer; | ||
22 | } | ||
23 | _ => {} | ||
24 | } | 21 | } |
25 | } | 22 | } |
26 | } | 23 | } |