W3cubDocs

/Rust

Error code E0670

Rust 2015 does not permit the use of async fn.

Erroneous code example:

#![allow(unused)]
fn main() {
async fn foo() {}
}

Switch to the Rust 2018 edition to use async fn.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0670.html