std.builtin: rename Type.UnionField and Type.StructField's field_type to type
This commit is contained in:
@@ -8,7 +8,7 @@ fn NamespacedGlobals(comptime modules: anytype) type {
|
||||
.fields = &.{
|
||||
.{
|
||||
.name = "globals",
|
||||
.field_type = modules.mach.globals,
|
||||
.type = modules.mach.globals,
|
||||
.default_value = null,
|
||||
.is_comptime = false,
|
||||
.alignment = @alignOf(modules.mach.globals),
|
||||
|
||||
@@ -7,7 +7,7 @@ fn NamespacedComponents(comptime modules: anytype) type {
|
||||
.is_tuple = false,
|
||||
.fields = &.{.{
|
||||
.name = "components",
|
||||
.field_type = @TypeOf(modules.components),
|
||||
.type = @TypeOf(modules.components),
|
||||
.default_value = null,
|
||||
.is_comptime = false,
|
||||
.alignment = @alignOf(@TypeOf(modules.components)),
|
||||
|
||||
@@ -8,7 +8,7 @@ fn CreateUnion(comptime T: type) type {
|
||||
.fields = &[_]std.builtin.Type.UnionField{
|
||||
.{
|
||||
.name = "field",
|
||||
.field_type = T,
|
||||
.type = T,
|
||||
.alignment = @alignOf(T),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ test "issue 6456" {
|
||||
fields = fields ++ &[_]StructField{StructField{
|
||||
.alignment = 0,
|
||||
.name = name,
|
||||
.field_type = usize,
|
||||
.type = usize,
|
||||
.default_value = &@as(?usize, null),
|
||||
.is_comptime = false,
|
||||
}};
|
||||
|
||||
Reference in New Issue
Block a user