aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/std/hash/auto_hash.zig8
-rw-r--r--lib/std/meta.zig16
-rw-r--r--lib/std/meta/trait.zig2
3 files changed, 8 insertions, 18 deletions
diff --git a/lib/std/hash/auto_hash.zig b/lib/std/hash/auto_hash.zig
index 251ac120f6..d7b26ce2ad 100644
--- a/lib/std/hash/auto_hash.zig
+++ b/lib/std/hash/auto_hash.zig
@@ -408,13 +408,13 @@ test "testHash union" {
}
test "testHash vector" {
- const a: meta.Vector(4, u32) = [_]u32{ 1, 2, 3, 4 };
- const b: meta.Vector(4, u32) = [_]u32{ 1, 2, 3, 5 };
+ const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 };
+ const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 };
try testing.expect(testHash(a) == testHash(a));
try testing.expect(testHash(a) != testHash(b));
- const c: meta.Vector(4, u31) = [_]u31{ 1, 2, 3, 4 };
- const d: meta.Vector(4, u31) = [_]u31{ 1, 2, 3, 5 };
+ const c: @Vector(4, u31) = [_]u31{ 1, 2, 3, 4 };
+ const d: @Vector(4, u31) = [_]u31{ 1, 2, 3, 5 };
try testing.expect(testHash(c) == testHash(c));
try testing.expect(testHash(c) != testHash(d));
}
diff --git a/lib/std/meta.zig b/lib/std/meta.zig
index d0b07b934f..4924e40bbb 100644
--- a/lib/std/meta.zig
+++ b/lib/std/meta.zig
@@ -146,7 +146,7 @@ test "std.meta.Child" {
try testing.expect(Child(*u8) == u8);
try testing.expect(Child([]u8) == u8);
try testing.expect(Child(?u8) == u8);
- try testing.expect(Child(Vector(2, u8)) == u8);
+ try testing.expect(Child(@Vector(2, u8)) == u8);
}
/// Given a "memory span" type (array, slice, vector, or pointer to such), returns the "element type".
@@ -173,8 +173,8 @@ test "std.meta.Elem" {
try testing.expect(Elem([*]u8) == u8);
try testing.expect(Elem([]u8) == u8);
try testing.expect(Elem(*[10]u8) == u8);
- try testing.expect(Elem(Vector(2, u8)) == u8);
- try testing.expect(Elem(*Vector(2, u8)) == u8);
+ try testing.expect(Elem(@Vector(2, u8)) == u8);
+ try testing.expect(Elem(*@Vector(2, u8)) == u8);
try testing.expect(Elem(?[*]u8) == u8);
}
@@ -1014,16 +1014,6 @@ test "std.meta.Float" {
try testing.expectEqual(f128, Float(128));
}
-/// Deprecated. Use `@Vector`.
-pub fn Vector(comptime len: u32, comptime child: type) type {
- return @Type(.{
- .Vector = .{
- .len = len,
- .child = child,
- },
- });
-}
-
/// For a given function type, returns a tuple type which fields will
/// correspond to the argument types.
///
diff --git a/lib/std/meta/trait.zig b/lib/std/meta/trait.zig
index 36f0a8924d..e8cf9bd3fc 100644
--- a/lib/std/meta/trait.zig
+++ b/lib/std/meta/trait.zig
@@ -271,7 +271,7 @@ pub fn isIndexable(comptime T: type) bool {
test "isIndexable" {
const array = [_]u8{0} ** 10;
const slice = @as([]const u8, &array);
- const vector: meta.Vector(2, u32) = [_]u32{0} ** 2;
+ const vector: @Vector(2, u32) = [_]u32{0} ** 2;
const tuple = .{ 1, 2, 3 };
try testing.expect(isIndexable(@TypeOf(array)));