Return a resolver for Definition::Local

This commit is contained in:
Zac Pullar-Strecker 2020-06-16 17:50:18 +12:00
parent 10c50b140a
commit f98e311617

View file

@ -89,8 +89,7 @@ impl Definition {
}
Definition::Macro(m) => Into::<ModuleId>::into(m.module(db)?).resolver(db),
Definition::SelfType(imp) => Into::<ImplId>::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::<DefWithBodyId>::into(local.parent(db)).resolver(db),
Definition::TypeParam(tp) => Into::<ModuleId>::into(tp.module(db)).resolver(db),
})
}