diff --git a/test/compile_errors.zig b/test/compile_errors.zig index fd27b8e66..c902e1d96 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -243,9 +243,9 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { "tmp.zig:17:17: error: RHS of shift is too large for LHS type", }); - cases.addTest("combination of noasync and async", + cases.addTest("combination of nosuspend and async", \\export fn entry() void { - \\ noasync { + \\ nosuspend { \\ const bar = async foo(); \\ suspend; \\ resume bar; @@ -253,9 +253,9 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { \\} \\fn foo() void {} , &[_][]const u8{ - "tmp.zig:3:21: error: async call in noasync scope", - "tmp.zig:4:9: error: suspend in noasync scope", - "tmp.zig:5:9: error: resume in noasync scope", + "tmp.zig:3:21: error: async call in nosuspend scope", + "tmp.zig:4:9: error: suspend in nosuspend scope", + "tmp.zig:5:9: error: resume in nosuspend scope", }); cases.add("atomicrmw with bool op not .Xchg", diff --git a/test/runtime_safety.zig b/test/runtime_safety.zig index 19af470e2..6837efe2d 100644 --- a/test/runtime_safety.zig +++ b/test/runtime_safety.zig @@ -234,12 +234,12 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { \\} ); - cases.addRuntimeSafety("noasync function call, callee suspends", + cases.addRuntimeSafety("nosuspend function call, callee suspends", \\pub fn panic(message: []const u8, stack_trace: ?*@import("builtin").StackTrace) noreturn { \\ @import("std").os.exit(126); \\} \\pub fn main() void { - \\ _ = noasync add(101, 100); + \\ _ = nosuspend add(101, 100); \\} \\fn add(a: i32, b: i32) i32 { \\ if (a > 100) { diff --git a/test/stage1/behavior/async_fn.zig b/test/stage1/behavior/async_fn.zig index 4b7806066..4f6ace989 100644 --- a/test/stage1/behavior/async_fn.zig +++ b/test/stage1/behavior/async_fn.zig @@ -1090,7 +1090,7 @@ test "recursive call of await @asyncCall with struct return type" { expect(res.z == 3); } -test "noasync function call" { +test "nosuspend function call" { const S = struct { fn doTheTest() void { const result = nosuspend add(50, 100); @@ -1511,7 +1511,7 @@ test "take address of temporary async frame" { S.doTheTest(); } -test "noasync await" { +test "nosuspend await" { const S = struct { var finished = false; @@ -1532,7 +1532,7 @@ test "noasync await" { expect(S.finished); } -test "noasync on function calls" { +test "nosuspend on function calls" { const S0 = struct { b: i32 = 42, };