mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
10 lines
280 B
Zig
10 lines
280 B
Zig
export fn foo() void {
|
|
const slice: []const u8 = &.{ 1, 2, 3 };
|
|
const result: [*]const u8 = @alignCast(slice);
|
|
_ = result;
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :3:33: error: cannot implicitly convert slice to many pointer
|
|
// :3:33: note: use 'ptr' field to convert slice to many pointer
|