-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
Description
in a newly created project, I have this in main.rs:
#[async_std::main]
async fn main() {
println!("Hello, world!");
}When saving the buffer, I get the following error:
error[E0670]: `async fn` is not permitted in the 2015 edition
--> /home/alarsyo/work/more-jpeg/src/main.rs:2:1
|
2 | async fn main() {
| ^^^^^
|
= note: to use `async fn`, switch to Rust 2018
= help: set `edition = "2018"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
This is a project I just created with cargo new, so it already has the 2018 edition setting. Running rustic-cargo-fmt doesn't have that problem, as it find the Cargo file correctly.
I'm on Doom emacs, if that helps.
Reactions are currently unavailable