Skip to content

Commit 4d803a0

Browse files
authored
Update compiler/rustc_codegen_ssa/src/mir/place.rs
1 parent 67d2c9f commit 4d803a0

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_ssa/src/mir/place.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
9797
self.llval
9898
} else {
9999
let byte_ptr = bx.pointercast(self.llval, bx.cx().type_i8p());
100-
// FIXME(eddyb) when can this not be `inbounds`? ZSTs?
101-
// (but since `offset` is larger than `0`, that would mean the
100+
// This is always `inbounds`. For example, ZSTs cannot arise
101+
// because `offset` is larger than `0`, which means the
102102
// allocation the place points into has at least one byte, so
103103
// any possible offset in the layout *should* be in-bounds)
104104
bx.inbounds_gep(bx.cx().type_i8(), byte_ptr, &[bx.const_usize(offset.bytes())])

0 commit comments

Comments
 (0)