diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 18:07:55 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | a91c6dc71d42ea59ec53ce4e0ae83e4970731313 (patch) | |
| tree | 815a549f1f16d6c6ce37d6f2d3034c484bb18ca9 /test/incremental | |
| parent | 1dcfc8787e86ed94d216976e621a49fc488e8214 (diff) | |
| download | zig-a91c6dc71d42ea59ec53ce4e0ae83e4970731313.tar.gz zig-a91c6dc71d42ea59ec53ce4e0ae83e4970731313.zip | |
test: std.fs.File -> std.Io.File
Diffstat (limited to 'test/incremental')
26 files changed, 76 insertions, 76 deletions
diff --git a/test/incremental/add_decl b/test/incremental/add_decl index 9efd274b9e..031085ca58 100644 --- a/test/incremental/add_decl +++ b/test/incremental/add_decl @@ -7,7 +7,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(foo); + try std.Io.File.stdout().writeAll(foo); } const foo = "good morning\n"; #expect_stdout="good morning\n" @@ -16,7 +16,7 @@ const foo = "good morning\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(foo); + try std.Io.File.stdout().writeAll(foo); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -26,7 +26,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(bar); + try std.Io.File.stdout().writeAll(bar); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -36,7 +36,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(qux); + try std.Io.File.stdout().writeAll(qux); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -46,7 +46,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(qux); + try std.Io.File.stdout().writeAll(qux); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -57,7 +57,7 @@ const qux = "good night\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(qux); + try std.Io.File.stdout().writeAll(qux); } const qux = "good night\n"; #expect_stdout="good night\n" diff --git a/test/incremental/add_decl_namespaced b/test/incremental/add_decl_namespaced index 1025ae24e1..cbeaf4865e 100644 --- a/test/incremental/add_decl_namespaced +++ b/test/incremental/add_decl_namespaced @@ -7,7 +7,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().foo); + try std.Io.File.stdout().writeAll(@This().foo); } const foo = "good morning\n"; #expect_stdout="good morning\n" @@ -16,7 +16,7 @@ const foo = "good morning\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().foo); + try std.Io.File.stdout().writeAll(@This().foo); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -26,7 +26,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().bar); + try std.Io.File.stdout().writeAll(@This().bar); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -36,7 +36,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().qux); + try std.Io.File.stdout().writeAll(@This().qux); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -47,7 +47,7 @@ const bar = "good evening\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().qux); + try std.Io.File.stdout().writeAll(@This().qux); } const foo = "good morning\n"; const bar = "good evening\n"; @@ -58,7 +58,7 @@ const qux = "good night\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@This().qux); + try std.Io.File.stdout().writeAll(@This().qux); } const qux = "good night\n"; #expect_stdout="good night\n" diff --git a/test/incremental/bad_import b/test/incremental/bad_import index 9b6be8b176..ad66c17b5b 100644 --- a/test/incremental/bad_import +++ b/test/incremental/bad_import @@ -8,7 +8,7 @@ #file=main.zig pub fn main() !void { _ = @import("foo.zig"); - try std.fs.File.stdout().writeAll("success\n"); + try std.Io.File.stdout().writeAll("success\n"); } const std = @import("std"); #file=foo.zig @@ -30,7 +30,7 @@ comptime { #file=main.zig pub fn main() !void { //_ = @import("foo.zig"); - try std.fs.File.stdout().writeAll("success\n"); + try std.Io.File.stdout().writeAll("success\n"); } const std = @import("std"); #expect_stdout="success\n" diff --git a/test/incremental/change_embed_file b/test/incremental/change_embed_file index 85d861ab93..1eed90dc32 100644 --- a/test/incremental/change_embed_file +++ b/test/incremental/change_embed_file @@ -8,7 +8,7 @@ const std = @import("std"); const string = @embedFile("string.txt"); pub fn main() !void { - try std.fs.File.stdout().writeAll(string); + try std.Io.File.stdout().writeAll(string); } #file=string.txt Hello, World! @@ -28,7 +28,7 @@ Hello again, World! const std = @import("std"); const string = @embedFile("string.txt"); pub fn main() !void { - try std.fs.File.stdout().writeAll("a hardcoded string\n"); + try std.Io.File.stdout().writeAll("a hardcoded string\n"); } #expect_stdout="a hardcoded string\n" @@ -37,7 +37,7 @@ pub fn main() !void { const std = @import("std"); const string = @embedFile("string.txt"); pub fn main() !void { - try std.fs.File.stdout().writeAll(string); + try std.Io.File.stdout().writeAll(string); } #expect_error=main.zig:2:27: error: unable to open 'string.txt': FileNotFound diff --git a/test/incremental/change_enum_tag_type b/test/incremental/change_enum_tag_type index 906f910271..6e72b3e573 100644 --- a/test/incremental/change_enum_tag_type +++ b/test/incremental/change_enum_tag_type @@ -15,7 +15,7 @@ const Foo = enum(Tag) { pub fn main() !void { var val: Foo = undefined; val = .a; - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{s}\n", .{@tagName(val)}); } const std = @import("std"); @@ -33,7 +33,7 @@ const Foo = enum(Tag) { pub fn main() !void { var val: Foo = undefined; val = .a; - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{s}\n", .{@tagName(val)}); } comptime { @@ -56,7 +56,7 @@ const Foo = enum(Tag) { pub fn main() !void { var val: Foo = undefined; val = .a; - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{s}\n", .{@tagName(val)}); } const std = @import("std"); diff --git a/test/incremental/change_exports b/test/incremental/change_exports index b0850626d6..0090d45d8e 100644 --- a/test/incremental/change_exports +++ b/test/incremental/change_exports @@ -17,7 +17,7 @@ pub fn main() !void { extern const bar: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{}\n", .{S.bar}); } const std = @import("std"); @@ -39,7 +39,7 @@ pub fn main() !void { extern const other: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); } const std = @import("std"); @@ -62,7 +62,7 @@ pub fn main() !void { extern const other: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); } const std = @import("std"); @@ -87,7 +87,7 @@ pub fn main() !void { extern const other: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); } const std = @import("std"); @@ -133,7 +133,7 @@ pub fn main() !void { extern const other: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); } const std = @import("std"); @@ -158,7 +158,7 @@ pub fn main() !void { extern const other: u32; }; S.foo(); - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{} {}\n", .{ S.bar, S.other }); } const std = @import("std"); diff --git a/test/incremental/change_fn_type b/test/incremental/change_fn_type index df788684cd..bcf006861a 100644 --- a/test/incremental/change_fn_type +++ b/test/incremental/change_fn_type @@ -8,7 +8,7 @@ pub fn main() !void { try foo(123); } fn foo(x: u8) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); return stdout_writer.interface.print("{d}\n", .{x}); } const std = @import("std"); @@ -20,7 +20,7 @@ pub fn main() !void { try foo(123); } fn foo(x: i64) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); return stdout_writer.interface.print("{d}\n", .{x}); } const std = @import("std"); @@ -32,7 +32,7 @@ pub fn main() !void { try foo(-42); } fn foo(x: i64) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); return stdout_writer.interface.print("{d}\n", .{x}); } const std = @import("std"); diff --git a/test/incremental/change_generic_line_number b/test/incremental/change_generic_line_number index f1920c67e6..252261af66 100644 --- a/test/incremental/change_generic_line_number +++ b/test/incremental/change_generic_line_number @@ -7,7 +7,7 @@ const std = @import("std"); fn Printer(message: []const u8) type { return struct { fn print() !void { - try std.fs.File.stdout().writeAll(message); + try std.Io.File.stdout().writeAll(message); } }; } @@ -23,7 +23,7 @@ const std = @import("std"); fn Printer(message: []const u8) type { return struct { fn print() !void { - try std.fs.File.stdout().writeAll(message); + try std.Io.File.stdout().writeAll(message); } }; } diff --git a/test/incremental/change_line_number b/test/incremental/change_line_number index 5c809b8fa9..a905745e6a 100644 --- a/test/incremental/change_line_number +++ b/test/incremental/change_line_number @@ -5,7 +5,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("foo\n"); + try std.Io.File.stdout().writeAll("foo\n"); } #expect_stdout="foo\n" #update=change line number @@ -13,6 +13,6 @@ pub fn main() !void { const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("foo\n"); + try std.Io.File.stdout().writeAll("foo\n"); } #expect_stdout="foo\n" diff --git a/test/incremental/change_panic_handler b/test/incremental/change_panic_handler index 070384887a..2fe9240b9b 100644 --- a/test/incremental/change_panic_handler +++ b/test/incremental/change_panic_handler @@ -12,7 +12,7 @@ pub fn main() !u8 { } pub const panic = std.debug.FullPanic(myPanic); fn myPanic(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } @@ -29,7 +29,7 @@ pub fn main() !u8 { } pub const panic = std.debug.FullPanic(myPanic); fn myPanic(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("new panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } @@ -46,7 +46,7 @@ pub fn main() !u8 { } pub const panic = std.debug.FullPanic(myPanicNew); fn myPanicNew(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("third panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } diff --git a/test/incremental/change_panic_handler_explicit b/test/incremental/change_panic_handler_explicit index 774b18bbfd..7daa851c8f 100644 --- a/test/incremental/change_panic_handler_explicit +++ b/test/incremental/change_panic_handler_explicit @@ -42,7 +42,7 @@ pub const panic = struct { pub const noreturnReturned = no_panic.noreturnReturned; }; fn myPanic(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } @@ -89,7 +89,7 @@ pub const panic = struct { pub const noreturnReturned = no_panic.noreturnReturned; }; fn myPanic(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("new panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } @@ -136,7 +136,7 @@ pub const panic = struct { pub const noreturnReturned = no_panic.noreturnReturned; }; fn myPanicNew(msg: []const u8, _: ?usize) noreturn { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); stdout_writer.interface.print("third panic message: {s}\n", .{msg}) catch {}; std.process.exit(0); } diff --git a/test/incremental/change_shift_op b/test/incremental/change_shift_op index 41b5d19266..557c17c0b1 100644 --- a/test/incremental/change_shift_op +++ b/test/incremental/change_shift_op @@ -9,7 +9,7 @@ pub fn main() !void { try foo(0x1300); } fn foo(x: u16) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("0x{x}\n", .{x << 4}); } const std = @import("std"); @@ -20,7 +20,7 @@ pub fn main() !void { try foo(0x1300); } fn foo(x: u16) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("0x{x}\n", .{x >> 4}); } const std = @import("std"); diff --git a/test/incremental/change_struct_same_fields b/test/incremental/change_struct_same_fields index 7af1161326..ef8ffab52d 100644 --- a/test/incremental/change_struct_same_fields +++ b/test/incremental/change_struct_same_fields @@ -11,7 +11,7 @@ pub fn main() !void { try foo(&val); } fn foo(val: *const S) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print( "{d} {d}\n", .{ val.x, val.y }, @@ -28,7 +28,7 @@ pub fn main() !void { try foo(&val); } fn foo(val: *const S) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print( "{d} {d}\n", .{ val.x, val.y }, @@ -45,7 +45,7 @@ pub fn main() !void { try foo(&val); } fn foo(val: *const S) !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print( "{d} {d}\n", .{ val.x, val.y }, diff --git a/test/incremental/change_zon_file b/test/incremental/change_zon_file index 62f73dd3bf..8a4c69cf21 100644 --- a/test/incremental/change_zon_file +++ b/test/incremental/change_zon_file @@ -8,7 +8,7 @@ const std = @import("std"); const message: []const u8 = @import("message.zon"); pub fn main() !void { - try std.fs.File.stdout().writeAll(message); + try std.Io.File.stdout().writeAll(message); } #file=message.zon "Hello, World!\n" @@ -29,7 +29,7 @@ pub fn main() !void { const std = @import("std"); const message: []const u8 = @import("message.zon"); pub fn main() !void { - try std.fs.File.stdout().writeAll("a hardcoded string\n"); + try std.Io.File.stdout().writeAll("a hardcoded string\n"); } #expect_error=message.zon:1:1: error: unable to load 'message.zon': FileNotFound #expect_error=main.zig:2:37: note: file imported here @@ -44,6 +44,6 @@ pub fn main() !void { const std = @import("std"); const message: []const u8 = @import("message.zon"); pub fn main() !void { - try std.fs.File.stdout().writeAll(message); + try std.Io.File.stdout().writeAll(message); } #expect_stdout="We're back, World!\n" diff --git a/test/incremental/change_zon_file_no_result_type b/test/incremental/change_zon_file_no_result_type index 498543e4f1..2dd601765f 100644 --- a/test/incremental/change_zon_file_no_result_type +++ b/test/incremental/change_zon_file_no_result_type @@ -7,7 +7,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(@import("foo.zon").message); + try std.Io.File.stdout().writeAll(@import("foo.zon").message); } #file=foo.zon .{ diff --git a/test/incremental/compile_log b/test/incremental/compile_log index 697bb26569..d52259f122 100644 --- a/test/incremental/compile_log +++ b/test/incremental/compile_log @@ -8,7 +8,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_stdout="Hello, World!\n" @@ -16,7 +16,7 @@ pub fn main() !void { #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); @compileLog("this is a log"); } #expect_error=main.zig:4:5: error: found compile log statement @@ -26,6 +26,6 @@ pub fn main() !void { #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_stdout="Hello, World!\n" diff --git a/test/incremental/fix_astgen_failure b/test/incremental/fix_astgen_failure index 8b1b3adbf7..4dce2492e7 100644 --- a/test/incremental/fix_astgen_failure +++ b/test/incremental/fix_astgen_failure @@ -10,21 +10,21 @@ pub fn main() !void { } #file=foo.zig pub fn hello() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_error=foo.zig:2:9: error: use of undeclared identifier 'std' #update=fix the error #file=foo.zig const std = @import("std"); pub fn hello() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_stdout="Hello, World!\n" #update=add new error #file=foo.zig const std = @import("std"); pub fn hello() !void { - try std.fs.File.stdout().writeAll(hello_str); + try std.Io.File.stdout().writeAll(hello_str); } #expect_error=foo.zig:3:39: error: use of undeclared identifier 'hello_str' #update=fix the new error @@ -32,6 +32,6 @@ pub fn hello() !void { const std = @import("std"); const hello_str = "Hello, World! Again!\n"; pub fn hello() !void { - try std.fs.File.stdout().writeAll(hello_str); + try std.Io.File.stdout().writeAll(hello_str); } #expect_stdout="Hello, World! Again!\n" diff --git a/test/incremental/function_becomes_inline b/test/incremental/function_becomes_inline index 240d7a54af..07cd98ef28 100644 --- a/test/incremental/function_becomes_inline +++ b/test/incremental/function_becomes_inline @@ -8,7 +8,7 @@ pub fn main() !void { try foo(); } fn foo() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } const std = @import("std"); #expect_stdout="Hello, World!\n" @@ -19,7 +19,7 @@ pub fn main() !void { try foo(); } inline fn foo() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } const std = @import("std"); #expect_stdout="Hello, World!\n" @@ -30,7 +30,7 @@ pub fn main() !void { try foo(); } inline fn foo() !void { - try std.fs.File.stdout().writeAll("Hello, `inline` World!\n"); + try std.Io.File.stdout().writeAll("Hello, `inline` World!\n"); } const std = @import("std"); #expect_stdout="Hello, `inline` World!\n" diff --git a/test/incremental/hello b/test/incremental/hello index dc6f02177f..8ff8f61bc0 100644 --- a/test/incremental/hello +++ b/test/incremental/hello @@ -7,13 +7,13 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("good morning\n"); + try std.Io.File.stdout().writeAll("good morning\n"); } #expect_stdout="good morning\n" #update=change the string #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll("おはようございます\n"); + try std.Io.File.stdout().writeAll("おはようございます\n"); } #expect_stdout="おはようございます\n" diff --git a/test/incremental/make_decl_pub b/test/incremental/make_decl_pub index b25b117160..9d90ca51eb 100644 --- a/test/incremental/make_decl_pub +++ b/test/incremental/make_decl_pub @@ -12,7 +12,7 @@ pub fn main() !void { #file=foo.zig const std = @import("std"); fn hello() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_error=main.zig:3:12: error: 'hello' is not marked 'pub' #expect_error=foo.zig:2:1: note: declared here @@ -21,6 +21,6 @@ fn hello() !void { #file=foo.zig const std = @import("std"); pub fn hello() !void { - try std.fs.File.stdout().writeAll("Hello, World!\n"); + try std.Io.File.stdout().writeAll("Hello, World!\n"); } #expect_stdout="Hello, World!\n" diff --git a/test/incremental/modify_inline_fn b/test/incremental/modify_inline_fn index d485d8ffd5..2c1478682e 100644 --- a/test/incremental/modify_inline_fn +++ b/test/incremental/modify_inline_fn @@ -8,7 +8,7 @@ const std = @import("std"); pub fn main() !void { const str = getStr(); - try std.fs.File.stdout().writeAll(str); + try std.Io.File.stdout().writeAll(str); } inline fn getStr() []const u8 { return "foo\n"; @@ -19,7 +19,7 @@ inline fn getStr() []const u8 { const std = @import("std"); pub fn main() !void { const str = getStr(); - try std.fs.File.stdout().writeAll(str); + try std.Io.File.stdout().writeAll(str); } inline fn getStr() []const u8 { return "bar\n"; diff --git a/test/incremental/move_src b/test/incremental/move_src index 4f43e8ea6a..d6a21fc562 100644 --- a/test/incremental/move_src +++ b/test/incremental/move_src @@ -7,7 +7,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{d} {d}\n", .{ foo(), bar() }); } fn foo() u32 { @@ -22,7 +22,7 @@ fn bar() u32 { #file=main.zig const std = @import("std"); pub fn main() !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{d} {d}\n", .{ foo(), bar() }); } diff --git a/test/incremental/no_change_preserves_tag_names b/test/incremental/no_change_preserves_tag_names index 623496119d..e399e083e1 100644 --- a/test/incremental/no_change_preserves_tag_names +++ b/test/incremental/no_change_preserves_tag_names @@ -8,7 +8,7 @@ const std = @import("std"); var some_enum: enum { first, second } = .first; pub fn main() !void { - try std.fs.File.stdout().writeAll(@tagName(some_enum)); + try std.Io.File.stdout().writeAll(@tagName(some_enum)); } #expect_stdout="first" #update=no change @@ -16,6 +16,6 @@ pub fn main() !void { const std = @import("std"); var some_enum: enum { first, second } = .first; pub fn main() !void { - try std.fs.File.stdout().writeAll(@tagName(some_enum)); + try std.Io.File.stdout().writeAll(@tagName(some_enum)); } #expect_stdout="first" diff --git a/test/incremental/recursive_function_becomes_non_recursive b/test/incremental/recursive_function_becomes_non_recursive index a5a03749b8..20e43b64b7 100644 --- a/test/incremental/recursive_function_becomes_non_recursive +++ b/test/incremental/recursive_function_becomes_non_recursive @@ -9,7 +9,7 @@ pub fn main() !void { try foo(false); } fn foo(recurse: bool) !void { - const stdout = std.fs.File.stdout(); + const stdout = std.Io.File.stdout(); if (recurse) return foo(true); try stdout.writeAll("non-recursive path\n"); } @@ -22,7 +22,7 @@ pub fn main() !void { try foo(true); } fn foo(recurse: bool) !void { - const stdout = std.fs.File.stdout(); + const stdout = std.Io.File.stdout(); if (recurse) return stdout.writeAll("x==1\n"); try stdout.writeAll("non-recursive path\n"); } diff --git a/test/incremental/remove_enum_field b/test/incremental/remove_enum_field index 02daf2a0fb..bbcf7718e9 100644 --- a/test/incremental/remove_enum_field +++ b/test/incremental/remove_enum_field @@ -10,7 +10,7 @@ const MyEnum = enum(u8) { bar = 2, }; pub fn main() !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{}\n", .{@intFromEnum(MyEnum.foo)}); } const std = @import("std"); @@ -22,7 +22,7 @@ const MyEnum = enum(u8) { bar = 2, }; pub fn main() !void { - var stdout_writer = std.fs.File.stdout().writerStreaming(&.{}); + var stdout_writer = std.Io.File.stdout().writerStreaming(&.{}); try stdout_writer.interface.print("{}\n", .{@intFromEnum(MyEnum.foo)}); } const std = @import("std"); diff --git a/test/incremental/unreferenced_error b/test/incremental/unreferenced_error index 505fb3d5f4..1c1f1f7a8f 100644 --- a/test/incremental/unreferenced_error +++ b/test/incremental/unreferenced_error @@ -7,7 +7,7 @@ #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(a); + try std.Io.File.stdout().writeAll(a); } const a = "Hello, World!\n"; #expect_stdout="Hello, World!\n" @@ -16,7 +16,7 @@ const a = "Hello, World!\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(a); + try std.Io.File.stdout().writeAll(a); } const a = @compileError("bad a"); #expect_error=main.zig:5:11: error: bad a @@ -25,7 +25,7 @@ const a = @compileError("bad a"); #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(b); + try std.Io.File.stdout().writeAll(b); } const a = @compileError("bad a"); const b = "Hi there!\n"; @@ -35,7 +35,7 @@ const b = "Hi there!\n"; #file=main.zig const std = @import("std"); pub fn main() !void { - try std.fs.File.stdout().writeAll(a); + try std.Io.File.stdout().writeAll(a); } const a = "Back to a\n"; const b = @compileError("bad b"); |
