aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-06-13 14:53:41 -0700
committerGitHub <noreply@github.com>2023-06-13 14:53:41 -0700
commit38fc826a5a82bbe11a893be11d3cc1439c477ee8 (patch)
treea6f1d07274887a20818b8e9f0798f1f74c318de5 /test/cases/compile_errors
parent700ea694b293565ececb7571e4d9613d2c143ca6 (diff)
parentd884d7050e061c620324aaaabfba507e08cb40f4 (diff)
downloadzig-38fc826a5a82bbe11a893be11d3cc1439c477ee8.tar.gz
zig-38fc826a5a82bbe11a893be11d3cc1439c477ee8.zip
Merge pull request #15957 from BratishkaErik/deprecated-
std.*: remove stuff that was deprecated in older versions
Diffstat (limited to 'test/cases/compile_errors')
-rw-r--r--test/cases/compile_errors/Issue_5586_Make_unary_minus_for_unsigned_types_a_compile_error.zig5
-rw-r--r--test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig4
-rw-r--r--test/cases/compile_errors/nested_vectors.zig2
-rw-r--r--test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig4
-rw-r--r--test/cases/compile_errors/vector_index_out_of_bounds.zig4
5 files changed, 9 insertions, 10 deletions
diff --git a/test/cases/compile_errors/Issue_5586_Make_unary_minus_for_unsigned_types_a_compile_error.zig b/test/cases/compile_errors/Issue_5586_Make_unary_minus_for_unsigned_types_a_compile_error.zig
index fd194f252d..643b5f6572 100644
--- a/test/cases/compile_errors/Issue_5586_Make_unary_minus_for_unsigned_types_a_compile_error.zig
+++ b/test/cases/compile_errors/Issue_5586_Make_unary_minus_for_unsigned_types_a_compile_error.zig
@@ -2,8 +2,7 @@ export fn f1(x: u32) u32 {
const y = -%x;
return -y;
}
-const V = @import("std").meta.Vector;
-export fn f2(x: V(4, u32)) V(4, u32) {
+export fn f2(x: @Vector(4, u32)) @Vector(4, u32) {
const y = -%x;
return -y;
}
@@ -13,4 +12,4 @@ export fn f2(x: V(4, u32)) V(4, u32) {
// target=native
//
// :3:12: error: negation of type 'u32'
-// :8:12: error: negation of type '@Vector(4, u32)'
+// :7:12: error: negation of type '@Vector(4, u32)'
diff --git a/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig b/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig
index 678d99376e..fda8ffe453 100644
--- a/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig
+++ b/test/cases/compile_errors/comptime_vector_overflow_shows_the_index.zig
@@ -1,6 +1,6 @@
comptime {
- var a: @import("std").meta.Vector(4, u8) = [_]u8{ 1, 2, 255, 4 };
- var b: @import("std").meta.Vector(4, u8) = [_]u8{ 5, 6, 1, 8 };
+ var a: @Vector(4, u8) = [_]u8{ 1, 2, 255, 4 };
+ var b: @Vector(4, u8) = [_]u8{ 5, 6, 1, 8 };
var x = a + b;
_ = x;
}
diff --git a/test/cases/compile_errors/nested_vectors.zig b/test/cases/compile_errors/nested_vectors.zig
index 9482c23005..11b09971e9 100644
--- a/test/cases/compile_errors/nested_vectors.zig
+++ b/test/cases/compile_errors/nested_vectors.zig
@@ -1,5 +1,5 @@
export fn entry() void {
- const V1 = @import("std").meta.Vector(4, u8);
+ const V1 = @Vector(4, u8);
const V2 = @Type(.{ .Vector = .{ .len = 4, .child = V1 } });
var v: V2 = undefined;
_ = v;
diff --git a/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig b/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig
index 1c602f7ab0..893d3c4e01 100644
--- a/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig
+++ b/test/cases/compile_errors/shuffle_with_selected_index_past_first_vector_length.zig
@@ -1,6 +1,6 @@
export fn entry() void {
- const v: @import("std").meta.Vector(4, u32) = [4]u32{ 10, 11, 12, 13 };
- const x: @import("std").meta.Vector(4, u32) = [4]u32{ 14, 15, 16, 17 };
+ const v: @Vector(4, u32) = [4]u32{ 10, 11, 12, 13 };
+ const x: @Vector(4, u32) = [4]u32{ 14, 15, 16, 17 };
var z = @shuffle(u32, v, x, [8]i32{ 0, 1, 2, 3, 7, 6, 5, 4 });
_ = z;
}
diff --git a/test/cases/compile_errors/vector_index_out_of_bounds.zig b/test/cases/compile_errors/vector_index_out_of_bounds.zig
index ed1a25a321..24e105c8e5 100644
--- a/test/cases/compile_errors/vector_index_out_of_bounds.zig
+++ b/test/cases/compile_errors/vector_index_out_of_bounds.zig
@@ -1,5 +1,5 @@
export fn entry() void {
- const x = @import("std").meta.Vector(3, f32){ 25, 75, 5, 0 };
+ const x = @Vector(3, f32){ 25, 75, 5, 0 };
_ = x;
}
@@ -7,4 +7,4 @@ export fn entry() void {
// backend=stage2
// target=native
//
-// :2:49: error: expected 3 vector elements; found 4
+// :2:30: error: expected 3 vector elements; found 4