Skip to content

I saw this error in a minimal project that didn't have a rustfmt.toml. I was able to make the errors go away by creating a rustfmt.toml and adding an edition = "2018" to it. #12232

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

Closed
amab8901 opened this issue May 12, 2022 · 3 comments

Comments

@amab8901
Copy link

I saw this error in a minimal project that didn't have a rustfmt.toml. I was able to make the errors go away by creating a rustfmt.toml and adding an edition = "2018" to it.

Originally posted by @davidbarsky in #1959 (comment)

@amab8901
Copy link
Author

it doesn't work for me. I'm still having the error

@davidbarsky
Copy link
Contributor

I can't close this issue, but @bjorn3's suggestion in #12233 (comment) is correct. You are on the 2015 edition, not the 2021 edition. The error message you pasted there says:

  = help: set `edition = "2021"` in `Cargo.toml`

@flodiebold
Copy link
Member

Duplicate of #12233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants