Skip to content

Commit

Permalink
Add a fixme
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Oct 12, 2022
1 parent 0c47fdf commit 8b2c3eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_ssa/src/mir/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8b2c3eb

Please sign in to comment.