about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2022-10-12 14:26:22 -0700
committerEric Holk <ericholk@microsoft.com>2022-10-12 14:26:22 -0700
commit8b2c3ebb86b0f9a1d218daa0bd94096170233b74 (patch)
tree4773ecfe5cbbb95da68208fb3552ead0f7b4900a
parent0c47fdfedbb44256b3c78f315cd6150190317e38 (diff)
downloadrust-8b2c3ebb86b0f9a1d218daa0bd94096170233b74.tar.gz
rust-8b2c3ebb86b0f9a1d218daa0bd94096170233b74.zip
Add a fixme
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index 5837b4ff2b9..e3491d36751 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -287,6 +287,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                             };
                         let vtable = get_vtable(bx.cx(), source.ty(self.mir, bx.tcx()), trait_ref);
                         let vtable = bx.pointercast(vtable, bx.cx().type_ptr_to(bx.cx().type_isize()));
+                        // FIXME(dyn-star): this is probably not the best way to check if this is
+                        // a pointer, and really we should ensure that the value is a suitable
+                        // pointer earlier in the compilation process.
                         let data = match operand.layout.pointee_info_at(bx.cx(), Size::ZERO) {
                             Some(_) => bx.ptrtoint(data, bx.cx().type_isize()),
                             None => data,