Skip to content

Commit 998aa38

Browse files
committed
Defer Place ty implementation in Stable Mir to later PR
1 parent 2e70d95 commit 998aa38

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
@@ -646,8 +646,10 @@ impl Constant {
646646
}
647647

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

0 commit comments

Comments
 (0)