update version data (#1021)

This commit is contained in:
Techatrix 2023-02-23 00:03:10 +00:00 committed by GitHub
parent 424a06b7ee
commit 9cb569a196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -522,6 +522,17 @@ pub const builtins = [_]Builtin{
"args: ...", "args: ...",
}, },
}, },
.{
.name = "@constCast",
.signature = "@constCast(value: anytype) DestType",
.snippet = "@constCast(${1:value: anytype})",
.documentation =
\\Remove `const` qualifier from a pointer.
,
.arguments = &.{
"value: anytype",
},
},
.{ .{
.name = "@ctz", .name = "@ctz",
.signature = "@ctz(operand: anytype)", .signature = "@ctz(operand: anytype)",
@ -1045,7 +1056,7 @@ pub const builtins = [_]Builtin{
\\ \\
\\This function is a low level intrinsic with no safety mechanisms. Most code should not use this function, instead using something like this: \\This function is a low level intrinsic with no safety mechanisms. Most code should not use this function, instead using something like this:
\\ \\
\\`for (source[0..byte_count]) |b, i| dest[i] = b;` \\`for (dest, source[0..byte_count]) |*d, s| d.* = s;`
\\The optimizer is intelligent enough to turn the above snippet into a memcpy. \\The optimizer is intelligent enough to turn the above snippet into a memcpy.
\\ \\
\\There is also a standard library function for this: \\There is also a standard library function for this:
@ -1252,7 +1263,8 @@ pub const builtins = [_]Builtin{
\\ \\
\\`@ptrCast` cannot be used for: \\`@ptrCast` cannot be used for:
\\ \\
\\ - Removing `const` or `volatile` qualifier, use [@qualCast](https://ziglang.org/documentation/master/#qualCast). \\ - Removing `const` qualifier, use [@constCast](https://ziglang.org/documentation/master/#constCast).
\\ - Removing `volatile` qualifier, use [@volatileCast](https://ziglang.org/documentation/master/#volatileCast).
\\ - Changing pointer address space, use [@addrSpaceCast](https://ziglang.org/documentation/master/#addrSpaceCast). \\ - Changing pointer address space, use [@addrSpaceCast](https://ziglang.org/documentation/master/#addrSpaceCast).
\\ - Increasing pointer alignment, use [@alignCast](https://ziglang.org/documentation/master/#alignCast). \\ - Increasing pointer alignment, use [@alignCast](https://ziglang.org/documentation/master/#alignCast).
\\ - Casting a non-slice pointer to a slice, use slicing syntax `ptr[start..end]`. \\ - Casting a non-slice pointer to a slice, use slicing syntax `ptr[start..end]`.
@ -1275,18 +1287,6 @@ pub const builtins = [_]Builtin{
"value: anytype", "value: anytype",
}, },
}, },
.{
.name = "@qualCast",
.signature = "@qualCast(comptime DestType: type, value: anytype) DestType",
.snippet = "@qualCast(${1:comptime DestType: type}, ${2:value: anytype})",
.documentation =
\\Remove `const` or `volatile` qualifier from a pointer.
,
.arguments = &.{
"comptime DestType: type",
"value: anytype",
},
},
.{ .{
.name = "@rem", .name = "@rem",
.signature = "@rem(numerator: T, denominator: T) T", .signature = "@rem(numerator: T, denominator: T) T",
@ -2007,6 +2007,17 @@ pub const builtins = [_]Builtin{
"Element: type", "Element: type",
}, },
}, },
.{
.name = "@volatileCast",
.signature = "@volatileCast(value: anytype) DestType",
.snippet = "@volatileCast(${1:value: anytype})",
.documentation =
\\Remove `volatile` qualifier from a pointer.
,
.arguments = &.{
"value: anytype",
},
},
}; };
// DO NOT EDIT // DO NOT EDIT