Fix to make zls compile for 0.11.0-dev.2775+21aa55d34.

This commit is contained in:
Mridul Krishna Mishra 2023-04-24 17:19:48 +05:30 committed by GitHub
parent 825cbd2e07
commit d122cbf157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,7 @@ const stack_frames = switch (zig_builtin.mode) {
pub fn main() !void { pub fn main() !void {
var gpa_state = std.heap.GeneralPurposeAllocator(.{ .stack_trace_frames = stack_frames }){}; var gpa_state = std.heap.GeneralPurposeAllocator(.{ .stack_trace_frames = stack_frames }){};
defer std.debug.assert(!gpa_state.deinit()); defer std.debug.assert(gpa_state.deinit() == .ok);
var tracy_state = if (tracy.enable_allocation) tracy.tracyAllocator(gpa_state.allocator()) else void{}; var tracy_state = if (tracy.enable_allocation) tracy.tracyAllocator(gpa_state.allocator()) else void{};
const inner_allocator: std.mem.Allocator = if (tracy.enable_allocation) tracy_state.allocator() else gpa_state.allocator(); const inner_allocator: std.mem.Allocator = if (tracy.enable_allocation) tracy_state.allocator() else gpa_state.allocator();