-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Labels
error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Description
Zig Version
0.12.0-dev.41+cd7998096
Steps to Reproduce and Observed Output
code:
const std = @import("std");
test {
var slice: []u8 = undefined;
std.heap.page_allocator.destroy(slice);
}error message:
/Users/jarred/zig/0.12.0-dev.41+cd7998096/files/lib/std/mem/Allocator.zig:113:28: error: ptr must be a single item pointer
if (info.size != .One) @compileError("ptr must be a single item pointer");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~There is no stack trace
Expected Output
A stack trace showing the line which is calling .destroy instead of .free
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.