Skip to content

Commit

Permalink
Defer Place ty implementation in Stable Mir to later PR
Browse files Browse the repository at this point in the history
  • Loading branch information
klinvill committed Nov 10, 2023
1 parent d44fa8a commit 3270247
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/stable_mir/src/mir/body.rs
Expand Up @@ -643,8 +643,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")
Expand Down

0 comments on commit 3270247

Please sign in to comment.