Skip to content

Commit f98e311

Browse files
committed
Return a resolver for Definition::Local
1 parent 10c50b1 commit f98e311

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ra_ide_db/src/defs.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ impl Definition {
8989
}
9090
Definition::Macro(m) => Into::<ModuleId>::into(m.module(db)?).resolver(db),
9191
Definition::SelfType(imp) => Into::<ImplId>::into(imp.clone()).resolver(db),
92-
// it's possible, read probable, that other arms of this are also unreachable
93-
Definition::Local(_local) => unreachable!(),
92+
Definition::Local(local) => Into::<DefWithBodyId>::into(local.parent(db)).resolver(db),
9493
Definition::TypeParam(tp) => Into::<ModuleId>::into(tp.module(db)).resolver(db),
9594
})
9695
}

0 commit comments

Comments
 (0)