aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target/Query.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-10-31 02:32:34 +0000
committermlugg <mlugg@mlugg.co.uk>2024-10-31 20:42:53 +0000
commit24babde746621492c5111ffcd8edf575cb176d65 (patch)
treec5f7affd52d47632874da1f533c888ef648e8304 /lib/std/Target/Query.zig
parentd11bbde5f9c64ef58405604601d55f88bb5d5f3a (diff)
downloadzig-24babde746621492c5111ffcd8edf575cb176d65.tar.gz
zig-24babde746621492c5111ffcd8edf575cb176d65.zip
std.mem.asBytes: fix footgun when passing non-single pointer
I was just bitten by this footgun, where I actually wanted `sliceAsBytes` but unintentionally used `asBytes`, which in practice ignored all but the first element. Just add a comptime assertion to trigger a compile error in this case.
Diffstat (limited to 'lib/std/Target/Query.zig')
0 files changed, 0 insertions, 0 deletions