Skip to content

Commit f89b192

Browse files
committed
Use offset instead of index
1 parent 2547971 commit f89b192

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+1
-4
lines changed

compiler/rustc_codegen_ssa/src/mir/place.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
422422
layout.size
423423
};
424424

425-
let llval = bx.inbounds_gep(bx.cx().backend_type(self.layout), self.val.llval, &[
426-
bx.cx().const_usize(0),
427-
llindex,
428-
]);
425+
let llval = bx.inbounds_gep(bx.cx().backend_type(layout), self.val.llval, &[llindex]);
429426
let align = self.val.align.restrict_for_offset(offset);
430427
PlaceValue::new_sized(llval, align).with_type(layout)
431428
}

0 commit comments

Comments
 (0)