note some FIXMEs

This commit is contained in:
Ralf Jung 2018-11-05 11:20:01 +01:00
parent 5ebd077f54
commit a6622c265c
2 changed files with 6 additions and 0 deletions

View file

@ -377,6 +377,9 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tc
// A field with extern type. If this field is at offset 0 and the sized
// part makes no alignment constraints, we behave like the underlying
// extern type.
// FIXME: Once we have made decisions for how to handle size and alignment
// of `extern type`, this should be adapted. It is just a temporary hack
// to get some code to work that probably ought to work.
if sized_size == Size::ZERO && sized_align.abi() == 1 {
return Ok(None)
} else {

View file

@ -356,6 +356,9 @@ where
let align = self.size_and_align_of(base.meta, field_layout)?
.map(|(_, align)| align)
// If this is an extern type, we fall back to its static alignment.
// FIXME: Once we have made decisions for how to handle size and alignment
// of `extern type`, this should be adapted. It is just a temporary hack
// to get some code to work that probably ought to work.
.unwrap_or_else(|| base.layout.align);
(base.meta, offset.abi_align(align))
} else {