aboutsummaryrefslogtreecommitdiff
path: root/lib/std/array_list.zig
diff options
context:
space:
mode:
authorJosh Holland <josh@inv.alid.pw>2020-11-06 18:57:26 +0000
committerJosh Holland <josh@inv.alid.pw>2020-11-07 11:15:47 +0000
commita1ec5448c77bee8d91c7e33d16416406b22fa159 (patch)
tree6c57e49b9bf09fc60388a5e5873f54dae55b0869 /lib/std/array_list.zig
parentc25b157ddaede518d92ee2d87ad536a5b6b097de (diff)
downloadzig-a1ec5448c77bee8d91c7e33d16416406b22fa159.tar.gz
zig-a1ec5448c77bee8d91c7e33d16416406b22fa159.zip
make ArrayList.span into a compile error
Diffstat (limited to 'lib/std/array_list.zig')
-rw-r--r--lib/std/array_list.zig8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/std/array_list.zig b/lib/std/array_list.zig
index 51d4d65df7..ab47510cb7 100644
--- a/lib/std/array_list.zig
+++ b/lib/std/array_list.zig
@@ -59,13 +59,7 @@ pub fn ArrayListAligned(comptime T: type, comptime alignment: ?u29) type {
self.allocator.free(self.allocatedSlice());
}
- /// Deprecated: use `items` field directly.
- /// Return contents as a slice. Only valid while the list
- /// doesn't change size.
- pub fn span(self: anytype) @TypeOf(self.items) {
- return self.items;
- }
-
+ pub const span = @compileError("deprecated: use `items` field directly");
pub const toSlice = @compileError("deprecated: use `items` field directly");
pub const toSliceConst = @compileError("deprecated: use `items` field directly");
pub const at = @compileError("deprecated: use `list.items[i]`");