Skip to content

Conversation

xFrednet
Copy link
Contributor

I noticed that our rustfmt.toml still has the edition 2018 listed. This updates the configuration to use 2021.

This luckily doesn't introduce any formatting changes 🙃

changelog: none

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 26, 2022
@xFrednet xFrednet force-pushed the 0000-update-edition-for-rustfmt branch from 9690a2e to acddac4 Compare February 26, 2022 19:33
@giraffate
Copy link
Contributor

FYI: https://github.com/rust-lang/rustfmt#rusts-editions

Rustfmt is able to pick up the edition used by reading the Cargo.toml file if executed through the Cargo's formatting tool cargo fmt. Otherwise, the edition needs to be specified in rustfmt.toml, e.g., with edition = "2018".

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Feb 27, 2022

📌 Commit acddac4 has been approved by giraffate

@bors
Copy link
Contributor

bors commented Feb 27, 2022

⌛ Testing commit acddac4 with merge 8d12cd4...

@bors
Copy link
Contributor

bors commented Feb 27, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 8d12cd4 to master...

@bors bors merged commit 8d12cd4 into rust-lang:master Feb 27, 2022
@xFrednet xFrednet deleted the 0000-update-edition-for-rustfmt branch February 27, 2022 15:18
@xFrednet
Copy link
Contributor Author

FYI: https://github.com/rust-lang/rustfmt#rusts-editions

Rustfmt is able to pick up the edition used by reading the Cargo.toml file if executed through the Cargo's formatting tool cargo fmt. Otherwise, the edition needs to be specified in rustfmt.toml, e.g., with edition = "2018".

I also found that when I looked up what the configuration actually does. I'm guessing that the value was or is needed for the rust repo as that doesn't use cargo. That's just a guess, though 🙃. Thanks for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants