diff options
| author | Kirby Linvill <kjlinvill@gmail.com> | 2023-11-09 20:43:05 -0700 |
|---|---|---|
| committer | Kirby Linvill <kjlinvill@gmail.com> | 2023-11-09 20:56:40 -0700 |
| commit | 998aa383ba159bc7c6a6eba13ce020c191988f82 (patch) | |
| tree | 4675124de46f97a976a1462d24b6e52b7592f488 | |
| parent | 2e70d95cdba8ea185c5d695c410744590785e4ac (diff) | |
| download | rust-998aa383ba159bc7c6a6eba13ce020c191988f82.tar.gz rust-998aa383ba159bc7c6a6eba13ce020c191988f82.zip | |
Defer Place ty implementation in Stable Mir to later PR
| -rw-r--r-- | compiler/stable_mir/src/mir/body.rs | 6 |
1 files 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") |
