internal: Give ConstBlockId and InTypeConstId named Location types

This commit is contained in:
Lukas Wirth 2023-06-12 18:21:17 +02:00
parent 6b3659d38f
commit abe249559d
12 changed files with 90 additions and 70 deletions

View file

@ -109,8 +109,13 @@ pub(crate) fn infer_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Arc<Infer
}
DefWithBodyId::InTypeConstId(c) => {
// FIXME(const-generic-body): We should not get the return type in this way.
ctx.return_ty =
c.lookup(db.upcast()).2.box_any().downcast::<InTypeConstIdMetadata>().unwrap().0;
ctx.return_ty = c
.lookup(db.upcast())
.thing
.box_any()
.downcast::<InTypeConstIdMetadata>()
.unwrap()
.0;
}
}