Skip to content

Commit 0b4e048

Browse files
committed
refixed @shlExact() and @shrExact() error messages
1 parent 8da54e1 commit 0b4e048

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/std/debug.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn FullPanic(comptime panicFn: fn ([]const u8, ?usize) noreturn) type {
9393
}
9494
pub fn shrOverflow() noreturn {
9595
@branchHint(.cold);
96-
call("exact right shift overflowed bits", @returnAddress());
96+
call("exact right shift shifted out 1 bits", @returnAddress());
9797
}
9898
pub fn divideByZero() noreturn {
9999
@branchHint(.cold);

lib/std/debug/simple_panic.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub fn shlOverflow() noreturn {
8585
}
8686

8787
pub fn shrOverflow() noreturn {
88-
call("exact right shift overflowed bits", null);
88+
call("exact right shift shifted out 1 bits", null);
8989
}
9090

9191
pub fn divideByZero() noreturn {

src/Sema/arith.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ fn intShr(
19781978
}
19791979
if (op == .shr_exact and lhs_bigint.ctz(shift_amt) < shift_amt) {
19801980
return sema.failWithOwnedErrorMsg(block, msg: {
1981-
const msg = try sema.errMsg(src, "exact shift shifted out 1 bits", .{});
1981+
const msg = try sema.errMsg(src, "exact right shift shifted out 1 bits", .{});
19821982
errdefer msg.destroy(sema.gpa);
19831983
if (vec_idx) |i| try sema.errNote(rhs_src, msg, "when computing vector element at index '{d}'", .{i});
19841984
break :msg msg;

0 commit comments

Comments
 (0)