fn CopyPtrAttrs(
comptime source: type,
comptime size: std.builtin.Type.Pointer.Size,
comptime child: type,
) type 4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373fn CopyPtrAttrs(
comptime source: type,
comptime size: std.builtin.Type.Pointer.Size,
comptime child: type,
) type {
const ptr = @typeInfo(source).pointer;
var attrs = ptr.attrs;
if (attrs.@"align" == null) {
const want = @alignOf(ptr.child);
if (@alignOf(child) != want) {
attrs.@"align" = want;
}
}
return @Pointer(size, attrs, child, null);
}