Skip to content

Commit 5b097d2

Browse files
authored
Update proposal.md (#1662)
1 parent e844ed6 commit 5b097d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

working/1661 - unawaited futures/proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ It's all about how *complete* we want to be vs. how complicated the analysis bec
6262

6363
### The false positive marker
6464

65-
To avoid the compile-time error, you can do any number of things within the language (including casting it using `as void`, although that would probably give you an "unnecessary cast" warning instead). We introduce a *recommend* way to avoid waiting for the future, by prefixing the expression with the contextually reserved word `unawaited` where you would otherwise write `await` to await the future. In short: `unawaited` becomes a reserved word inside asynchronous functions, just like `await` and `yield` currently are. It can be used in exactly the same places as `await`.
65+
To avoid the compile-time error, you can do any number of things within the language (including casting it using `as void`, although that would probably give you an "unnecessary cast" warning instead). We introduce a *recommended* way to avoid waiting for the future, by prefixing the expression with the contextually reserved word `unawaited` where you would otherwise write `await` to await the future. In short: `unawaited` becomes a reserved word inside asynchronous functions, just like `await` and `yield` currently are. It can be used in exactly the same places as `await`.
6666

6767
This keyword is deliberately visible and up-front so that people reading the code are aware that a future is being ignored here. A reviewer can easily see that a future is not awaited, and question whether it should be.
6868

0 commit comments

Comments
 (0)