mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
std: prevent testing.io from use outside tests
This commit is contained in:
parent
b0691df5ba
commit
28639bd6d7
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{
|
|||
};
|
||||
|
||||
pub var io_instance: Io.Threaded = undefined;
|
||||
pub const io = io_instance.io();
|
||||
pub const io = if (builtin.is_test) io_instance.io() else @compileError("not testing");
|
||||
|
||||
/// TODO https://github.com/ziglang/zig/issues/5738
|
||||
pub var log_level = std.log.Level.warn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue