Skip to content

Commit 3270247

Browse files
committed
Defer Place ty implementation in Stable Mir to later PR
1 parent d44fa8a commit 3270247

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/stable_mir/src/mir/body.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,10 @@ impl Constant {
643643
}
644644

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

0 commit comments

Comments
 (0)