aboutsummaryrefslogtreecommitdiff
path: root/doc/docgen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-01 21:27:55 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-12-01 21:27:55 -0500
commit37caa56fbc04d314aa8fe5df6bc80c42d879dd7e (patch)
treef1b64879d38563b2cc49ec742d33b95d24427e40 /doc/docgen.zig
parentc32e50f5058dd3720db24706391c994545d13640 (diff)
downloadzig-37caa56fbc04d314aa8fe5df6bc80c42d879dd7e.tar.gz
zig-37caa56fbc04d314aa8fe5df6bc80c42d879dd7e.zip
fix docs regressions
Diffstat (limited to 'doc/docgen.zig')
-rw-r--r--doc/docgen.zig32
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig
index 5d216a1914..2158cdccae 100644
--- a/doc/docgen.zig
+++ b/doc/docgen.zig
@@ -1039,7 +1039,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
const name_plus_ext = try std.fmt.allocPrint(allocator, "{}.zig", code.name);
const tmp_source_file_name = try fs.path.join(
allocator,
- [_][]const u8{ tmp_dir_name, name_plus_ext },
+ &[_][]const u8{ tmp_dir_name, name_plus_ext },
);
try io.writeFile(tmp_source_file_name, trimmed_raw_source);
@@ -1048,7 +1048,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
const name_plus_bin_ext = try std.fmt.allocPrint(allocator, "{}{}", code.name, exe_ext);
var build_args = std.ArrayList([]const u8).init(allocator);
defer build_args.deinit();
- try build_args.appendSlice([_][]const u8{
+ try build_args.appendSlice(&[_][]const u8{
zig_exe,
"build-exe",
tmp_source_file_name,
@@ -1079,7 +1079,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
const name_with_ext = try std.fmt.allocPrint(allocator, "{}{}", link_object, obj_ext);
const full_path_object = try fs.path.join(
allocator,
- [_][]const u8{ tmp_dir_name, name_with_ext },
+ &[_][]const u8{ tmp_dir_name, name_with_ext },
);
try build_args.append("--object");
try build_args.append(full_path_object);
@@ -1090,7 +1090,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
try out.print(" -lc");
}
if (code.target_str) |triple| {
- try build_args.appendSlice([_][]const u8{ "-target", triple });
+ try build_args.appendSlice(&[_][]const u8{ "-target", triple });
if (!code.is_inline) {
try out.print(" -target {}", triple);
}
@@ -1143,7 +1143,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
}
const path_to_exe = mem.trim(u8, exec_result.stdout, " \r\n");
- const run_args = [_][]const u8{path_to_exe};
+ const run_args = &[_][]const u8{path_to_exe};
var exited_with_signal = false;
@@ -1184,7 +1184,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
var test_args = std.ArrayList([]const u8).init(allocator);
defer test_args.deinit();
- try test_args.appendSlice([_][]const u8{
+ try test_args.appendSlice(&[_][]const u8{
zig_exe,
"test",
tmp_source_file_name,
@@ -1212,7 +1212,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
try out.print(" -lc");
}
if (code.target_str) |triple| {
- try test_args.appendSlice([_][]const u8{ "-target", triple });
+ try test_args.appendSlice(&[_][]const u8{ "-target", triple });
try out.print(" -target {}", triple);
}
const result = exec(allocator, &env_map, test_args.toSliceConst()) catch return parseError(tokenizer, code.source_token, "test failed");
@@ -1224,7 +1224,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
var test_args = std.ArrayList([]const u8).init(allocator);
defer test_args.deinit();
- try test_args.appendSlice([_][]const u8{
+ try test_args.appendSlice(&[_][]const u8{
zig_exe,
"test",
"--color",
@@ -1283,7 +1283,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
var test_args = std.ArrayList([]const u8).init(allocator);
defer test_args.deinit();
- try test_args.appendSlice([_][]const u8{
+ try test_args.appendSlice(&[_][]const u8{
zig_exe,
"test",
tmp_source_file_name,
@@ -1345,7 +1345,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
const name_plus_obj_ext = try std.fmt.allocPrint(allocator, "{}{}", code.name, obj_ext);
const tmp_obj_file_name = try fs.path.join(
allocator,
- [_][]const u8{ tmp_dir_name, name_plus_obj_ext },
+ &[_][]const u8{ tmp_dir_name, name_plus_obj_ext },
);
var build_args = std.ArrayList([]const u8).init(allocator);
defer build_args.deinit();
@@ -1353,10 +1353,10 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
const name_plus_h_ext = try std.fmt.allocPrint(allocator, "{}.h", code.name);
const output_h_file_name = try fs.path.join(
allocator,
- [_][]const u8{ tmp_dir_name, name_plus_h_ext },
+ &[_][]const u8{ tmp_dir_name, name_plus_h_ext },
);
- try build_args.appendSlice([_][]const u8{
+ try build_args.appendSlice(&[_][]const u8{
zig_exe,
"build-obj",
tmp_source_file_name,
@@ -1395,7 +1395,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
}
if (code.target_str) |triple| {
- try build_args.appendSlice([_][]const u8{ "-target", triple });
+ try build_args.appendSlice(&[_][]const u8{ "-target", triple });
try out.print(" -target {}", triple);
}
@@ -1442,7 +1442,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
var test_args = std.ArrayList([]const u8).init(allocator);
defer test_args.deinit();
- try test_args.appendSlice([_][]const u8{
+ try test_args.appendSlice(&[_][]const u8{
zig_exe,
"build-lib",
tmp_source_file_name,
@@ -1466,7 +1466,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
},
}
if (code.target_str) |triple| {
- try test_args.appendSlice([_][]const u8{ "-target", triple });
+ try test_args.appendSlice(&[_][]const u8{ "-target", triple });
try out.print(" -target {}", triple);
}
const result = exec(allocator, &env_map, test_args.toSliceConst()) catch return parseError(tokenizer, code.source_token, "test failed");
@@ -1507,7 +1507,7 @@ fn exec(allocator: *mem.Allocator, env_map: *std.BufMap, args: []const []const u
}
fn getBuiltinCode(allocator: *mem.Allocator, env_map: *std.BufMap, zig_exe: []const u8) ![]const u8 {
- const result = try exec(allocator, env_map, [_][]const u8{
+ const result = try exec(allocator, env_map, &[_][]const u8{
zig_exe,
"builtin",
});