Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const zls_version = std.SemanticVersion.parse(@import("build.zig.zon").version)
const minimum_build_zig_version = @import("build.zig.zon").minimum_zig_version;

/// Specifies the minimum Zig version that is runtime compatible with ZLS
const minimum_runtime_zig_version = "0.18.0-dev.897+117fd40fb";
const minimum_runtime_zig_version = "0.18.0-dev.1007+3e4c8a80e";

const release_targets = [_]std.Target.Query{
.{ .cpu_arch = .aarch64, .os_tag = .linux },
Expand Down
6 changes: 3 additions & 3 deletions src/DocumentScope.zig
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ pub const Scope = struct {
}
};

pub const Data = packed union {
pub const Data = bitpack union {
ast_node: Ast.Node.Index,
};

pub const SmallLoc = packed struct {
pub const SmallLoc = bitpack struct {
start: u32,
end: u32,
};
Expand All @@ -270,7 +270,7 @@ pub const Scope = struct {
},
};

data: packed struct(u64) {
data: bitpack struct(u64) {
tag: Tag,
is_child_scopes_small: bool,
is_child_decls_small: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/TrigramStore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ const CuckooFilter = struct {
index_2: BucketIndex,

pub fn initFromTrigram(trigram: Trigram, len: u32) Triplet {
const split: packed struct {
const split: bitpack struct {
fingerprint: Fingerprint,
padding: u24,
index_1: u32,
Expand Down
14 changes: 7 additions & 7 deletions src/analyser/InternPool.zig
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub const Key = union(enum) {
flags: Flags,
packed_offset: PackedOffset = .{ .bit_offset = 0, .host_size = 0 },

pub const Flags = packed struct(u32) {
pub const Flags = bitpack struct(u32) {
size: std.lang.Type.Pointer.Size,
is_const: bool = false,
is_volatile: bool = false,
Expand All @@ -84,7 +84,7 @@ pub const Key = union(enum) {
alignment: u16 = 0,
};

pub const PackedOffset = packed struct(u32) {
pub const PackedOffset = bitpack struct(u32) {
bit_offset: u16,
host_size: u16,
};
Expand Down Expand Up @@ -123,7 +123,7 @@ pub const Key = union(enum) {
return_type: Index,
flags: Flags = .{},

pub const Flags = packed struct(u32) {
pub const Flags = bitpack struct(u32) {
calling_convention: std.lang.CallingConvention.Tag = .auto,
is_generic: bool = false,
is_var_args: bool = false,
Expand Down Expand Up @@ -197,7 +197,7 @@ pub const Key = union(enum) {
}
};

const F64Value = packed struct {
const F64Value = bitpack struct {
a: u32,
b: u32,

Expand All @@ -210,7 +210,7 @@ pub const Key = union(enum) {
}
};

const F80Value = packed struct {
const F80Value = bitpack struct {
a: u32,
b: u32,
c: u32,
Expand All @@ -226,7 +226,7 @@ pub const Key = union(enum) {
}
};

const F128Value = packed struct {
const F128Value = bitpack struct {
a: u32,
b: u32,
c: u32,
Expand Down Expand Up @@ -3349,7 +3349,7 @@ pub fn intInfo(ip: *InternPool, ty: Index, target: std.Target) std.lang.Type.Int
},
.struct_type => |struct_index| {
const struct_info = ip.getStruct(struct_index);
assert(struct_info.layout == .@"packed");
assert(struct_info.layout == .@"bitpack");
index = struct_info.backing_int_ty;
},
// TODO revisit this when error sets support custom int types (comment taken from zig codebase)
Expand Down
2 changes: 1 addition & 1 deletion src/configuration.zig
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ pub const UnresolvedConfig = blk: {

/// A packed struct where every field name is copied from `Config` but the field type is `bool`.
pub const DidConfigChange = @Struct(
.@"packed",
.@"bitpack",
null,
@typeInfo(Config).@"struct".field_names,
&@splat(bool),
Expand Down
2 changes: 1 addition & 1 deletion src/features/semantic_tokens.zig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub const TokenType = enum(u32) {
keywordLiteral,
};

pub const TokenModifiers = packed struct(u16) {
pub const TokenModifiers = bitpack struct(u16) {
declaration: bool = false,
definition: bool = false,
readonly: bool = false,
Expand Down
4 changes: 2 additions & 2 deletions tests/lsp_features/completion.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3417,7 +3417,7 @@ test "function arguments of @Struct" {
\\}
, &.{
.{ .label = "@\"extern\"", .kind = .EnumMember },
.{ .label = "@\"packed\"", .kind = .EnumMember },
.{ .label = "@\"bitpack\"", .kind = .EnumMember },
.{ .label = "auto", .kind = .EnumMember },
});
}
Expand All @@ -3429,7 +3429,7 @@ test "function arguments of @Union" {
\\}
, &.{
.{ .label = "@\"extern\"", .kind = .EnumMember },
.{ .label = "@\"packed\"", .kind = .EnumMember },
.{ .label = "@\"bitpack\"", .kind = .EnumMember },
.{ .label = "auto", .kind = .EnumMember },
});
}
Expand Down
Loading