-
Notifications
You must be signed in to change notification settings - Fork 1.7k
error[E0670]: async fn
is not permitted in the 2015 edition
#1959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this works as expected? This error comes from |
Probably it's cargo problem then (should it report that if project is on 2018 edition). |
@kanekv @matklad can you reopen this? I'm getting the same error -- but it only happens through rust-analyzer. For some reason, it seems to think the project is on 2015, but it's definitely on 2018, and And yes, it's definitely breaking something: It's preventing format-on-save from working, so I keep committing bad fmt stuff 😅 |
@zkat a minimal reproducible example will help here. For formatting, we just use |
I saw this error in a minimal project that didn't have a |
@matklad The repro is so small, it's not even worth putting up on a repo:
FWIW, @davidbarsky's suggestion of adding a |
Looks like this behavior is (somewhat) intentional, as |
I'd say that this is out of scope, for now. it will be in scope once we switch to rustfmt as a library (which isn't goint to happen any time soon). Closing as a dupe of #2146 (which contains some more rational). |
I'm getting this error in some projects with Sublime Text and rust-analyzer, but not all. The |
This change is to fix the error `[E0670]: async fn is not permitted in the 2015 edition` when using Vim with rust-analyzer. Ref: rust-lang/rust-analyzer#1959
This PR is mainly to fix the error `[E0670]: async fn is not permitted in the 2015 edition` when using Vim along with rust-analyzer, it also removes an unused dependency from parachain-template. Ref: rust-lang/rust-analyzer#1959
This PR is mainly to fix the error `[E0670]: async fn is not permitted in the 2015 edition` when using Vim along with rust-analyzer, it also removes an unused dependency from parachain-template. Ref: rust-lang/rust-analyzer#1959
it seems that the issue still remains |
Just in case someone else made the same mistake I did, I was having this issue where it was stating that my edition was 2015 because I made the mistake of changing my "main.rs" filename to something else and did not specify a target in my "Cargo.toml" file. Changing the name back was the first issue, but then I learned that I had to use |
This PR is mainly to fix the error `[E0670]: async fn is not permitted in the 2015 edition` when using Vim along with rust-analyzer, it also removes an unused dependency from parachain-template. Ref: rust-lang/rust-analyzer#1959
For us putting this in cargo.toml does not seem to have an effect. But adding a rustfmt.toml with the same value as per the docs works. |
This fixed it! |
This PR is mainly to fix the error `[E0670]: async fn is not permitted in the 2015 edition` when using Vim along with rust-analyzer, it also removes an unused dependency from parachain-template. Ref: rust-lang/rust-analyzer#1959
I'm getting this error in the output. It doesn't break anything though.
The text was updated successfully, but these errors were encountered: