Skip to content

Commit 8b2c3eb

Browse files
committed
Add a fixme
1 parent 0c47fdf commit 8b2c3eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+3
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
287287
};
288288
let vtable = get_vtable(bx.cx(), source.ty(self.mir, bx.tcx()), trait_ref);
289289
let vtable = bx.pointercast(vtable, bx.cx().type_ptr_to(bx.cx().type_isize()));
290+
// FIXME(dyn-star): this is probably not the best way to check if this is
291+
// a pointer, and really we should ensure that the value is a suitable
292+
// pointer earlier in the compilation process.
290293
let data = match operand.layout.pointee_info_at(bx.cx(), Size::ZERO) {
291294
Some(_) => bx.ptrtoint(data, bx.cx().type_isize()),
292295
None => data,

0 commit comments

Comments
 (0)