]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0744.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0744.md
1 An unsupported expression was used inside a const context.
2
3 Erroneous code example:
4
5 ```compile_fail,edition2018,E0744
6 const _: i32 = {
7     async { 0 }.await
8 };
9 ```
10
11 At the moment, `.await` is forbidden inside a `const`, `static`, or `const fn`.
12
13 This may be allowed at some point in the future, but the implementation is not
14 yet complete. See the tracking issue for [`async`] in `const fn`.
15
16 [`async`]: https://github.com/rust-lang/rust/issues/69431