From f98e311617f66654b7799a966fc16b272438ed00 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Tue, 16 Jun 2020 17:50:18 +1200 Subject: Return a resolver for Definition::Local --- crates/ra_ide_db/src/defs.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_ide_db/src/defs.rs') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index b07395a64..bc6e89cbc 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -89,8 +89,7 @@ impl Definition { } Definition::Macro(m) => Into::::into(m.module(db)?).resolver(db), Definition::SelfType(imp) => Into::::into(imp.clone()).resolver(db), - // it's possible, read probable, that other arms of this are also unreachable - Definition::Local(_local) => unreachable!(), + Definition::Local(local) => Into::::into(local.parent(db)).resolver(db), Definition::TypeParam(tp) => Into::::into(tp.module(db)).resolver(db), }) } -- cgit v1.2.3