zig/lib/std/debug
mlugg c1a5caa454
compiler: combine @intCast safety checks
`castTruncatedData` was a poorly worded error (all shrinking casts
"truncate bits", it's just that we assume those bits to be zext/sext of
the other bits!), and `negativeToUnsigned` was a pointless distinction
which forced the compiler to emit worse code (since two separate safety
checks were required for casting e.g. 'i32' to 'u16') and wasn't even
implemented correctly. This commit combines those safety panics into one
function, `integerOutOfBounds`. The name maybe isn't perfect, but that's
not hugely important; what matters is the new default message, which is
clearer than the old ones: "integer does not fit in destination type".
2025-06-01 12:10:57 +01:00
..
Dwarf std.Target: Remove Cpu.Arch.spu_2. 2025-02-17 19:17:55 +01:00
Coverage.zig std: Restore conventional compareFn behavior for binarySearch 2024-09-16 14:04:18 -07:00
Dwarf.zig debug: correctly detect missing entries in .eh_frame_hdr 2025-05-17 02:08:41 -04:00
FixedBufferReader.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
Info.zig runtime page size detection 2025-02-06 14:23:23 -08:00
MemoryAccessor.zig adjust runtime page size APIs 2025-02-06 14:23:23 -08:00
no_panic.zig compiler: combine @intCast safety checks 2025-06-01 12:10:57 +01:00
Pdb.zig std.pdb: obey naming conventions 2024-08-29 23:43:52 +01:00
SelfInfo.zig debug: correctly detect missing entries in .eh_frame_hdr 2025-05-17 02:08:41 -04:00
simple_panic.zig compiler: combine @intCast safety checks 2025-06-01 12:10:57 +01:00