From 998aa383ba159bc7c6a6eba13ce020c191988f82 Mon Sep 17 00:00:00 2001 From: Kirby Linvill Date: Thu, 9 Nov 2023 20:43:05 -0700 Subject: [PATCH] Defer Place ty implementation in Stable Mir to later PR --- compiler/stable_mir/src/mir/body.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/stable_mir/src/mir/body.rs b/compiler/stable_mir/src/mir/body.rs index 49b85d665b1..625e52c983e 100644 --- a/compiler/stable_mir/src/mir/body.rs +++ b/compiler/stable_mir/src/mir/body.rs @@ -646,8 +646,10 @@ impl Constant { } 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")