authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 16:05:42-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 16:05:42-04:00
loged23dad4877cd93fd684852b17e0e554ef71e297
tree8c5cddda93e5910d46cccb45a1d3c6c811022f5d
parent4d290758bb3145f65840ad0ac244fc4388bde9e0
signaturelock-open Commit is signed but in an unrecognized format.

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.

1 files changed, 2 insertions(+), 2 deletions(-)

test/runtime_safety.zig+2-2
...@@ -56,7 +56,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {...@@ -56,7 +56,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
56 \\const std = @import("std");56 \\const std = @import("std");
57 ++ check_panic_msg ++57 ++ check_panic_msg ++
58 \\pub fn main() void {58 \\pub fn main() void {
59 \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };59 \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
60 \\ const slice = buf_slice[0..3 :0];60 \\ const slice = buf_slice[0..3 :0];
61 \\}61 \\}
62 );62 );
...@@ -64,7 +64,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {...@@ -64,7 +64,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
64 \\const std = @import("std");64 \\const std = @import("std");
65 ++ check_panic_msg ++65 ++ check_panic_msg ++
66 \\pub fn main() void {66 \\pub fn main() void {
67 \\ var buf_slice: []u8 = &[3]u8{ 'a', 'b', 0 };67 \\ var buf_slice: []const u8 = &[3]u8{ 'a', 'b', 0 };
68 \\ const slice = buf_slice[0.. :0];68 \\ const slice = buf_slice[0.. :0];
69 \\}69 \\}
70 );70 );