diff --git a/safety/empty slice with sentinel out of bounds.zig b/safety/empty slice with sentinel out of bounds.zig index 835b084740c5..d989a33541c1 100644 --- a/safety/empty slice with sentinel out of bounds.zig +++ b/safety/empty slice with sentinel out of bounds.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace) noreturn { _ = stack_trace; - if (std.mem.eql(u8, message, "attempt to index out of bound: index 1, len 0")) { + if (std.mem.eql(u8, message, "index out of bounds: index 1, len 0")) { std.process.exit(0); } std.process.exit(1); diff --git a/safety/out of bounds slice access.zig b/safety/out of bounds slice access.zig index a30532aee78c..ddd9e74cf285 100644 --- a/safety/out of bounds slice access.zig +++ b/safety/out of bounds slice access.zig @@ -2,20 +2,20 @@ const std = @import("std"); pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace) noreturn { _ = stack_trace; - if (std.mem.eql(u8, message, "attempt to index out of bound: index 4, len 4")) { + if (std.mem.eql(u8, message, "index out of bounds: index 4, len 4")) { std.process.exit(0); } std.process.exit(1); } pub fn main() !void { - const a = [_]i32{1, 2, 3, 4}; + const a = [_]i32{ 1, 2, 3, 4 }; baz(bar(&a)); return error.TestFailed; } fn bar(a: []const i32) i32 { return a[4]; } -fn baz(_: i32) void { } +fn baz(_: i32) void {} // run // backend=llvm // target=native diff --git a/safety/slice with sentinel out of bounds - runtime len.zig b/safety/slice with sentinel out of bounds - runtime len.zig index fa2e127107c8..524c69d7b7dd 100644 --- a/safety/slice with sentinel out of bounds - runtime len.zig +++ b/safety/slice with sentinel out of bounds - runtime len.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace) noreturn { _ = stack_trace; - if (std.mem.eql(u8, message, "attempt to index out of bound: index 5, len 4")) { + if (std.mem.eql(u8, message, "index out of bounds: index 5, len 4")) { std.process.exit(0); } std.process.exit(1); diff --git a/safety/slice with sentinel out of bounds.zig b/safety/slice with sentinel out of bounds.zig index 3cc8bfb355a4..636235a5b34c 100644 --- a/safety/slice with sentinel out of bounds.zig +++ b/safety/slice with sentinel out of bounds.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace) noreturn { _ = stack_trace; - if (std.mem.eql(u8, message, "attempt to index out of bound: index 5, len 4")) { + if (std.mem.eql(u8, message, "index out of bounds: index 5, len 4")) { std.process.exit(0); } std.process.exit(1);