Error code E0744

An unsupported expression was used inside a const context.

Erroneous code example:

const _: i32 = {
    async { 0 }.await
};
Run

At the moment, .await is forbidden inside a const, static, or const fn.

This may be allowed at some point in the future, but the implementation is not yet complete. See the tracking issue for async in const fn.

Back to list of error codes