about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/mir/place.rs
diff options
context:
space:
mode:
authorouz-a <ouz.agz@gmail.com>2023-08-28 11:19:19 +0300
committerMark Rousskov <mark.simulacrum@gmail.com>2023-12-04 09:55:14 -0500
commitcaab4b7d945532fc543db99a26e20ee9907ea412 (patch)
tree2cb85a9532223faaebd800f3bb6990ef5e686434 /compiler/rustc_codegen_ssa/src/mir/place.rs
parentfa7a3184b49946e6bc6e77c0d79ed231ea29c69a (diff)
downloadrust-caab4b7d945532fc543db99a26e20ee9907ea412.tar.gz
rust-caab4b7d945532fc543db99a26e20ee9907ea412.zip
Add docs, remove code, change subtyper code
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir/place.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/place.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/place.rs b/compiler/rustc_codegen_ssa/src/mir/place.rs
index 9ff73aab907..eb590a45a63 100644
--- a/compiler/rustc_codegen_ssa/src/mir/place.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/place.rs
@@ -466,6 +466,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                 mir::ProjectionElem::OpaqueCast(ty) => {
                     bug!("encountered OpaqueCast({ty}) in codegen")
                 }
+                mir::ProjectionElem::Subtype(ty) => cg_base.project_type(bx, self.monomorphize(ty)),
                 mir::ProjectionElem::Index(index) => {
                     let index = &mir::Operand::Copy(mir::Place::from(index));
                     let index = self.codegen_operand(bx, index);
@@ -499,7 +500,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                     subslice
                 }
                 mir::ProjectionElem::Downcast(_, v) => cg_base.project_downcast(bx, v),
-                mir::ProjectionElem::Subtype(_) => continue,
             };
         }
         debug!("codegen_place(place={:?}) => {:?}", place_ref, cg_base);