diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-11-04 16:04:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-04 16:04:31 +0200 |
| commit | 8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6 (patch) | |
| tree | 2a90fb00f39cb5eae5f8083e2b8462a2e198f918 /lib/std/meta.zig | |
| parent | ea54c9a375ef8f419694b39b9f14f181fa0b82ee (diff) | |
| parent | 577daab08cd2119604b5ee501e4bd8aeb2619668 (diff) | |
| download | zig-8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6.tar.gz zig-8c4faa5f3f63cfbcfdc12cda7c37be1da642d2f6.zip | |
Merge pull request #13338 from Vexu/stage2-compile-errors
Improve some error messages
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 600a8ab012..e75108e101 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -304,7 +304,7 @@ pub fn Sentinel(comptime T: type, comptime sentinel_val: Elem(T)) type { .Array = .{ .len = array_info.len, .child = array_info.child, - .sentinel = &sentinel_val, + .sentinel = @ptrCast(?*const anyopaque, &sentinel_val), }, }), .is_allowzero = info.is_allowzero, @@ -322,7 +322,7 @@ pub fn Sentinel(comptime T: type, comptime sentinel_val: Elem(T)) type { .address_space = info.address_space, .child = info.child, .is_allowzero = info.is_allowzero, - .sentinel = &sentinel_val, + .sentinel = @ptrCast(?*const anyopaque, &sentinel_val), }, }), else => {}, @@ -340,7 +340,7 @@ pub fn Sentinel(comptime T: type, comptime sentinel_val: Elem(T)) type { .address_space = ptr_info.address_space, .child = ptr_info.child, .is_allowzero = ptr_info.is_allowzero, - .sentinel = &sentinel_val, + .sentinel = @ptrCast(?*const anyopaque, &sentinel_val), }, }), }, |
