aboutsummaryrefslogtreecommitdiff
path: root/test/runtime_safety.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-07 16:05:42 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-04-07 16:05:42 -0400
commited23dad4877cd93fd684852b17e0e554ef71e297 (patch)
tree8c5cddda93e5910d46cccb45a1d3c6c811022f5d /test/runtime_safety.zig
parent4d290758bb3145f65840ad0ac244fc4388bde9e0 (diff)
downloadzig-ed23dad4877cd93fd684852b17e0e554ef71e297.tar.gz
zig-ed23dad4877cd93fd684852b17e0e554ef71e297.zip
fix the new runtime-safety tests
Thanks to Vexu's work in e62671f643, compile errors were identified in these test cases! This commit fixes them to use `const` as appropriate.
Diffstat (limited to 'test/runtime_safety.zig')
-rw-r--r--test/runtime_safety.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/runtime_safety.zig b/test/runtime_safety.zig
index 6bbc7dc19d..a2eed71b45 100644
--- a/test/runtime_safety.zig
+++ b/test/runtime_safety.zig
@@ -56,7 +56,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\const std = @import("std");
++ check_panic_msg ++
\\pub fn main() void {
- \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };
+ \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
\\ const slice = buf_slice[0..3 :0];
\\}
);
@@ -64,7 +64,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\const std = @import("std");
++ check_panic_msg ++
\\pub fn main() void {
- \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };
+ \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
\\ const slice = buf_slice[0.. :0];
\\}
);