aboutsummaryrefslogtreecommitdiff
path: root/lib/std/builtin.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-01 13:07:55 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-03-01 13:07:55 -0500
commit5b26128bacddf594dfe45958a236bfa2459f878b (patch)
tree46843b88c41264e6ad4a3ffe5a743d94f7051b47 /lib/std/builtin.zig
parent4505857e30233d87f9ece403458c0988e8c68493 (diff)
downloadzig-5b26128bacddf594dfe45958a236bfa2459f878b.tar.gz
zig-5b26128bacddf594dfe45958a236bfa2459f878b.zip
add new functions to std.mem and deprecate others
add std.mem.Span add std.mem.span add std.mem.length add std.mem.indexOfSentinel deprecate std.mem.len deprecate std.mem.toSlice deprecate std.mem.toSliceConst
Diffstat (limited to 'lib/std/builtin.zig')
-rw-r--r--lib/std/builtin.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index de37fda903..a4f0ef269f 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -185,6 +185,7 @@ pub const TypeInfo = union(enum) {
child: type,
is_allowzero: bool,
+ /// This field is an optional type.
/// The type of the sentinel is the element type of the pointer, which is
/// the value of the `child` field in this struct. However there is no way
/// to refer to that type here, so we use `var`.
@@ -206,6 +207,7 @@ pub const TypeInfo = union(enum) {
len: comptime_int,
child: type,
+ /// This field is an optional type.
/// The type of the sentinel is the element type of the array, which is
/// the value of the `child` field in this struct. However there is no way
/// to refer to that type here, so we use `var`.