will even be valid code. Futures in this article are declared as var, meaning mutable. This appears to be because Future.await is going to take a pointer as its initial argument. However, because it's a temporary and therefore treated as const, the return value of io.async will not be passable to a .await function expecting a *Future as its initial argument without first being stored in a mutable var.
So this would be valid:
var save_future = io.async(saveFile, .{io, data, "saveA.txt"});
save_future.await(io);
But the original presented in the parent comment would be equivalent to the following, and therefore invalid:
So this would be valid:
But the original presented in the parent comment would be equivalent to the following, and therefore invalid: