More ids in Ty

This commit is contained in:
Aleksey Kladov 2019-11-25 18:31:48 +03:00
parent ecd1204804
commit 3e32ac4f86
4 changed files with 13 additions and 17 deletions

View file

@ -538,14 +538,6 @@ pub enum DefWithBody {
impl_froms!(DefWithBody: Function, Const, Static);
impl DefWithBody {
pub(crate) fn krate(self, db: &impl HirDatabase) -> Option<Crate> {
match self {
DefWithBody::Const(c) => c.krate(db),
DefWithBody::Function(f) => f.krate(db),
DefWithBody::Static(s) => s.krate(db),
}
}
pub fn module(self, db: &impl HirDatabase) -> Module {
match self {
DefWithBody::Const(c) => c.module(db),