aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJosh Holland <josh@inv.alid.pw>2020-11-06 18:54:08 +0000
committerJosh Holland <josh@inv.alid.pw>2020-11-07 11:15:44 +0000
commitc25b157ddaede518d92ee2d87ad536a5b6b097de (patch)
tree1599c465bab670beb50b63c2a5b9d8f0411fbc9d /src/main.zig
parentc9551652b01bf47a94c139846f22c5df85d07283 (diff)
downloadzig-c25b157ddaede518d92ee2d87ad536a5b6b097de.tar.gz
zig-c25b157ddaede518d92ee2d87ad536a5b6b097de.zip
remove deprecated uses of ArrayList.span
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 7df8cb1eda..8911242b68 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -2501,7 +2501,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void {
defer fmt.seen.deinit();
defer fmt.out_buffer.deinit();
- for (input_files.span()) |file_path| {
+ for (input_files.items) |file_path| {
// Get the real path here to avoid Windows failing on relative file paths with . or .. in them.
const real_path = fs.realpathAlloc(gpa, file_path) catch |err| {
fatal("unable to open '{}': {}", .{ file_path, err });
@@ -2681,7 +2681,7 @@ fn printErrMsgToFile(
defer text_buf.deinit();
const out_stream = text_buf.outStream();
try parse_error.render(tree.token_ids, out_stream);
- const text = text_buf.span();
+ const text = text_buf.items;
const stream = file.outStream();
try stream.print("{}:{}:{}: error: {}\n", .{ path, start_loc.line + 1, start_loc.column + 1, text });
@@ -2830,7 +2830,7 @@ pub const ClangArgIterator = struct {
defer resp_arg_list.deinit();
{
errdefer {
- for (resp_arg_list.span()) |item| {
+ for (resp_arg_list.items) |item| {
allocator.free(mem.span(item));
}
}