| author | |
| committer | |
| log | 2c9204032d1c839d8d577113a9c4def4b9ea9b94 |
| tree | 0e8776be19c1552380dca6f5916e304a77de0773 |
| parent | af00afed9844b9fb17478d33840fb4a312c4f07c |
| signature | Commit is signed but in an unrecognized format. |
3 files changed, 10 insertions(+), 10 deletions(-)
test/compile_errors.zig+5-5| ... | ... | @@ -243,9 +243,9 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 243 | 243 | "tmp.zig:17:17: error: RHS of shift is too large for LHS type", |
| 244 | 244 | }); |
| 245 | 245 | |
| 246 | cases.addTest("combination of noasync and async", | |
| 246 | cases.addTest("combination of nosuspend and async", | |
| 247 | 247 | \\export fn entry() void { |
| 248 | \\ noasync { | |
| 248 | \\ nosuspend { | |
| 249 | 249 | \\ const bar = async foo(); |
| 250 | 250 | \\ suspend; |
| 251 | 251 | \\ resume bar; |
| ... | ... | @@ -253,9 +253,9 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 253 | 253 | \\} |
| 254 | 254 | \\fn foo() void {} |
| 255 | 255 | , &[_][]const u8{ |
| 256 | "tmp.zig:3:21: error: async call in noasync scope", | |
| 257 | "tmp.zig:4:9: error: suspend in noasync scope", | |
| 258 | "tmp.zig:5:9: error: resume in noasync scope", | |
| 256 | "tmp.zig:3:21: error: async call in nosuspend scope", | |
| 257 | "tmp.zig:4:9: error: suspend in nosuspend scope", | |
| 258 | "tmp.zig:5:9: error: resume in nosuspend scope", | |
| 259 | 259 | }); |
| 260 | 260 | |
| 261 | 261 | cases.add("atomicrmw with bool op not .Xchg", |
test/runtime_safety.zig+2-2| ... | ... | @@ -234,12 +234,12 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 234 | 234 | \\} |
| 235 | 235 | ); |
| 236 | 236 | |
| 237 | cases.addRuntimeSafety("noasync function call, callee suspends", | |
| 237 | cases.addRuntimeSafety("nosuspend function call, callee suspends", | |
| 238 | 238 | \\pub fn panic(message: []const u8, stack_trace: ?*@import("builtin").StackTrace) noreturn { |
| 239 | 239 | \\ @import("std").os.exit(126); |
| 240 | 240 | \\} |
| 241 | 241 | \\pub fn main() void { |
| 242 | \\ _ = noasync add(101, 100); | |
| 242 | \\ _ = nosuspend add(101, 100); | |
| 243 | 243 | \\} |
| 244 | 244 | \\fn add(a: i32, b: i32) i32 { |
| 245 | 245 | \\ if (a > 100) { |
test/stage1/behavior/async_fn.zig+3-3| ... | ... | @@ -1090,7 +1090,7 @@ test "recursive call of await @asyncCall with struct return type" { |
| 1090 | 1090 | expect(res.z == 3); |
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | test "noasync function call" { | |
| 1093 | test "nosuspend function call" { | |
| 1094 | 1094 | const S = struct { |
| 1095 | 1095 | fn doTheTest() void { |
| 1096 | 1096 | const result = nosuspend add(50, 100); |
| ... | ... | @@ -1511,7 +1511,7 @@ test "take address of temporary async frame" { |
| 1511 | 1511 | S.doTheTest(); |
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | test "noasync await" { | |
| 1514 | test "nosuspend await" { | |
| 1515 | 1515 | const S = struct { |
| 1516 | 1516 | var finished = false; |
| 1517 | 1517 | |
| ... | ... | @@ -1532,7 +1532,7 @@ test "noasync await" { |
| 1532 | 1532 | expect(S.finished); |
| 1533 | 1533 | } |
| 1534 | 1534 | |
| 1535 | test "noasync on function calls" { | |
| 1535 | test "nosuspend on function calls" { | |
| 1536 | 1536 | const S0 = struct { |
| 1537 | 1537 | b: i32 = 42, |
| 1538 | 1538 | }; |