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 {
|
||||
comptime {
|
||||
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) {
|
||||
@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;
|
||||
while (true) switch (key) {
|
||||
.simple_type => |simple| switch (simple) {
|
||||
.usize => return .{ .signedness = .signed, .bits = target.cpu.arch.ptrBitWidth() },
|
||||
.isize => return .{ .signedness = .unsigned, .bits = target.cpu.arch.ptrBitWidth() },
|
||||
.usize => return .{ .signedness = .signed, .bits = target.ptrBitWidth() },
|
||||
.isize => return .{ .signedness = .unsigned, .bits = target.ptrBitWidth() },
|
||||
|
||||
.c_char => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.char) },
|
||||
.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;
|
||||
defer file.close();
|
||||
const stat = file.stat() catch continue;
|
||||
if (stat.kind == .Directory) continue;
|
||||
if (stat.kind == .directory) continue;
|
||||
|
||||
return try allocator.dupe(u8, full_path);
|
||||
}
|
||||
|
@ -183,8 +183,6 @@ pub const builtins = [_]Builtin{
|
||||
.snippet = "@boolToInt(${1:value: bool})",
|
||||
.documentation =
|
||||
\\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 = &.{
|
||||
"value: bool",
|
||||
|
@ -993,22 +993,22 @@ fn completeFileSystemStringLiteral(
|
||||
else => unreachable,
|
||||
};
|
||||
switch (entry.kind) {
|
||||
.File => if (expected_extension) |expected| {
|
||||
.file => if (expected_extension) |expected| {
|
||||
const actual_extension = std.fs.path.extension(entry.name);
|
||||
if (!std.mem.eql(u8, actual_extension, expected)) continue;
|
||||
},
|
||||
.Directory => {},
|
||||
.directory => {},
|
||||
else => continue,
|
||||
}
|
||||
|
||||
_ = try completions.getOrPut(arena, types.CompletionItem{
|
||||
.label = try arena.dupe(u8, entry.name),
|
||||
.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})
|
||||
else
|
||||
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