E0054

E0054#

Async function or method is missing the error annotation.

Asynchronous functions and methods are expected to specify the errors they can raise.If an async function or method is guaranteed not to raise any errors, it must be explicitly marked with the noraise annotation. This clarifies the function’s behavior for anyone using it.

错误示例#

///|
pub async fn println(str : String) -> Unit {
  ...
}

建议#

Add noraise or raise E to the function signature.

///|
pub async fn println(str : String) -> Unit noraise {
  ...
}