Defer Place ty implementation in Stable Mir to later PR

This commit is contained in:
Kirby Linvill 2023-11-09 20:43:05 -07:00
parent 2e70d95cdb
commit 998aa383ba
No known key found for this signature in database
GPG Key ID: E304CE3F028E6E3F

View File

@ -646,8 +646,10 @@ pub fn ty(&self) -> Ty {
}
impl Place {
// TODO(klinvill): What is the expected behavior of this function? Should it resolve down the
// chain of projections so that `*(_1.f)` would end up returning the type referenced by `f`?
// FIXME(klinvill): This function is expected to resolve down the chain of projections to get
// the type referenced at the end of it. E.g. calling `ty()` on `*(_1.f)` should end up
// returning the type referenced by `f`. The information needed to do this may not currently be
// present in Stable MIR since at least an implementation for AdtDef is probably needed.
pub fn ty(&self, locals: &[LocalDecl]) -> Ty {
let _start_ty = locals[self.local].ty;
todo!("Implement projection")