place evaluation: require the original pointer to be aligned if an access happens
This commit is contained in:
parent
ea9a24e32e
commit
f3f9b795bd
22 changed files with 266 additions and 219 deletions
|
@ -267,6 +267,7 @@ where
|
|||
let len = base.len(self)?;
|
||||
let field_layout = base.layout().field(self, 0);
|
||||
// Ensure that all the offsets are in-bounds once, up-front.
|
||||
debug!("project_array_fields: {base:?} {len}");
|
||||
base.offset(len * stride, self.layout_of(self.tcx.types.unit).unwrap(), self)?;
|
||||
// Create the iterator.
|
||||
Ok(ArrayIterator { base, range: 0..len, stride, field_layout, _phantom: PhantomData })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue