fn AlignedSlice(comptime AttributeSource: type, comptime new_alignment: usize) type 5006
5007
5008
5009
5010
5011fn AlignedSlice(comptime AttributeSource: type, comptime new_alignment: usize) type {
const ptr = @typeInfo(AttributeSource).pointer;
var attrs = ptr.attrs;
attrs.@"align" = new_alignment;
return @Pointer(.slice, attrs, ptr.child, null);
}
Returns a slice with the given new alignment, all other pointer attributes copied from
AttributeSource.