| ... | @@ -831,10 +831,10 @@ test "sizeof" { | ... | @@ -831,10 +831,10 @@ test "sizeof" { |
| 831 | /// with those types as fields. | 831 | /// with those types as fields. |
| 832 | /// | 832 | /// |
| 833 | /// Examples: | 833 | /// Examples: |
| 834 | /// - `Tuple(.{})` ⇒ `tuple { }` | 834 | /// - `Tuple(&[_]type {})` ⇒ `tuple { }` |
| 835 | /// - `Tuple(.{f32})` ⇒ `tuple { f32 }` | 835 | /// - `Tuple(&[_]type {f32})` ⇒ `tuple { f32 }` |
| 836 | /// - `Tuple(.{f32,u32})` ⇒ `tuple { f32, u32 }` | 836 | /// - `Tuple(&[_]type {f32,u32})` ⇒ `tuple { f32, u32 }` |
| 837 | pub fn Tuple(comptime types: anytype) type { | 837 | pub fn Tuple(comptime types: []const type) type { |
| 838 | var tuple_fields: [types.len]std.builtin.TypeInfo.StructField = undefined; | 838 | var tuple_fields: [types.len]std.builtin.TypeInfo.StructField = undefined; |
| 839 | inline for (types) |T, i| { | 839 | inline for (types) |T, i| { |
| 840 | @setEvalBranchQuota(10_000); | 840 | @setEvalBranchQuota(10_000); |
| ... | @@ -883,8 +883,8 @@ test "Tuple" { | ... | @@ -883,8 +883,8 @@ test "Tuple" { |
| 883 | } | 883 | } |
| 884 | }; | 884 | }; |
| 885 | | 885 | |
| 886 | T.assertTuple(.{}, Tuple(.{})); | 886 | T.assertTuple(.{}, Tuple(&[_]type{})); |
| 887 | T.assertTuple(.{u32}, Tuple(.{u32})); | 887 | T.assertTuple(.{u32}, Tuple(&[_]type{u32})); |
| 888 | T.assertTuple(.{ u32, f16 }, Tuple(.{ u32, f16 })); | 888 | T.assertTuple(.{ u32, f16 }, Tuple(&[_]type{ u32, f16 })); |
| 889 | T.assertTuple(.{ u32, f16, []const u8 }, Tuple(.{ u32, f16, []const u8 })); | 889 | T.assertTuple(.{ u32, f16, []const u8 }, Tuple(&[_]type{ u32, f16, []const u8 })); |
| 890 | } | 890 | } |