update to Zig 0.11.0-dev.3312+ab37ab33c
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
parent
0de454195c
commit
905f531a08
@ -7,7 +7,7 @@ const zls_version = std.builtin.Version{ .major = 0, .minor = 11, .patch = 0 };
|
|||||||
pub fn build(b: *std.build.Builder) !void {
|
pub fn build(b: *std.build.Builder) !void {
|
||||||
comptime {
|
comptime {
|
||||||
const current_zig = builtin.zig_version;
|
const current_zig = builtin.zig_version;
|
||||||
const min_zig = std.SemanticVersion.parse("0.11.0-dev.3134+018b743c7") catch unreachable; // std.http: do -> wait, fix redirects
|
const min_zig = std.SemanticVersion.parse("0.11.0-dev.3312+ab37ab33c") catch unreachable; // poly1305: properly cast the mask from u1 to u64
|
||||||
if (current_zig.order(min_zig) == .lt) {
|
if (current_zig.order(min_zig) == .lt) {
|
||||||
@compileError(std.fmt.comptimePrint("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig }));
|
@compileError(std.fmt.comptimePrint("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig }));
|
||||||
}
|
}
|
||||||
|
@ -452,8 +452,8 @@ pub const Key = union(enum) {
|
|||||||
var key: Key = ty;
|
var key: Key = ty;
|
||||||
while (true) switch (key) {
|
while (true) switch (key) {
|
||||||
.simple_type => |simple| switch (simple) {
|
.simple_type => |simple| switch (simple) {
|
||||||
.usize => return .{ .signedness = .signed, .bits = target.cpu.arch.ptrBitWidth() },
|
.usize => return .{ .signedness = .signed, .bits = target.ptrBitWidth() },
|
||||||
.isize => return .{ .signedness = .unsigned, .bits = target.cpu.arch.ptrBitWidth() },
|
.isize => return .{ .signedness = .unsigned, .bits = target.ptrBitWidth() },
|
||||||
|
|
||||||
.c_char => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.char) },
|
.c_char => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.char) },
|
||||||
.c_short => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.short) },
|
.c_short => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.short) },
|
||||||
|
@ -261,7 +261,7 @@ pub fn findZig(allocator: std.mem.Allocator) !?[]const u8 {
|
|||||||
const file = std.fs.openFileAbsolute(full_path, .{}) catch continue;
|
const file = std.fs.openFileAbsolute(full_path, .{}) catch continue;
|
||||||
defer file.close();
|
defer file.close();
|
||||||
const stat = file.stat() catch continue;
|
const stat = file.stat() catch continue;
|
||||||
if (stat.kind == .Directory) continue;
|
if (stat.kind == .directory) continue;
|
||||||
|
|
||||||
return try allocator.dupe(u8, full_path);
|
return try allocator.dupe(u8, full_path);
|
||||||
}
|
}
|
||||||
|
@ -183,8 +183,6 @@ pub const builtins = [_]Builtin{
|
|||||||
.snippet = "@boolToInt(${1:value: bool})",
|
.snippet = "@boolToInt(${1:value: bool})",
|
||||||
.documentation =
|
.documentation =
|
||||||
\\Converts `true` to `@as(u1, 1)` and `false` to `@as(u1, 0)`.
|
\\Converts `true` to `@as(u1, 1)` and `false` to `@as(u1, 0)`.
|
||||||
\\
|
|
||||||
\\If the value is known at compile-time, the return type is `comptime_int` instead of `u1`.
|
|
||||||
,
|
,
|
||||||
.arguments = &.{
|
.arguments = &.{
|
||||||
"value: bool",
|
"value: bool",
|
||||||
|
@ -993,22 +993,22 @@ fn completeFileSystemStringLiteral(
|
|||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
switch (entry.kind) {
|
switch (entry.kind) {
|
||||||
.File => if (expected_extension) |expected| {
|
.file => if (expected_extension) |expected| {
|
||||||
const actual_extension = std.fs.path.extension(entry.name);
|
const actual_extension = std.fs.path.extension(entry.name);
|
||||||
if (!std.mem.eql(u8, actual_extension, expected)) continue;
|
if (!std.mem.eql(u8, actual_extension, expected)) continue;
|
||||||
},
|
},
|
||||||
.Directory => {},
|
.directory => {},
|
||||||
else => continue,
|
else => continue,
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = try completions.getOrPut(arena, types.CompletionItem{
|
_ = try completions.getOrPut(arena, types.CompletionItem{
|
||||||
.label = try arena.dupe(u8, entry.name),
|
.label = try arena.dupe(u8, entry.name),
|
||||||
.detail = if (pos_context == .cinclude_string_literal) path else null,
|
.detail = if (pos_context == .cinclude_string_literal) path else null,
|
||||||
.insertText = if (entry.kind == .Directory)
|
.insertText = if (entry.kind == .directory)
|
||||||
try std.fmt.allocPrint(arena, "{s}/", .{entry.name})
|
try std.fmt.allocPrint(arena, "{s}/", .{entry.name})
|
||||||
else
|
else
|
||||||
null,
|
null,
|
||||||
.kind = if (entry.kind == .File) .File else .Folder,
|
.kind = if (entry.kind == .file) .File else .Folder,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user