Skip to content

Commit e88e7b9

Browse files
committed
make PointeeInfo::align non-optional
Instead of defaulting to `None` it now defaults to `Align::ONE` i.e. no alignment restriction. Codegen test changes are due to us now skipping `align 1` annotations (they are useless; not skipping them makes all the raw pointers gain an `align 1` annotation which doesn't seem any good)
1 parent 0e15610 commit e88e7b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/type_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
289289
Pointer(address_space) => {
290290
// If we know the alignment, pick something better than i8.
291291
let pointee = if let Some(pointee) = self.pointee_info_at(cx, offset)
292-
&& let Some(align) = pointee.align
292+
&& pointee.align > rustc_abi::Align::ONE
293293
{
294-
cx.type_pointee_for_align(align)
294+
cx.type_pointee_for_align(pointee.align)
295295
} else {
296296
cx.type_i8()
297297
};

0 commit comments

Comments
 (0)