note some FIXMEs
This commit is contained in:
parent
5ebd077f54
commit
a6622c265c
2 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue