Skip to content
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

Recommend rustfmt --edition=2021 #1211

Merged
merged 1 commit into from
Oct 10, 2021
Merged

Conversation

camelid
Copy link
Member

@camelid camelid commented Sep 19, 2021

Now that rust-lang/rust#89103 has merged, most of rust-lang/rust is on Rust 2021.

@camelid camelid added S-blocked Status: this PR is blocked waiting for something S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content and removed S-blocked Status: this PR is blocked waiting for something labels Sep 19, 2021
@camelid
Copy link
Member Author

camelid commented Sep 22, 2021

No longer blocked!

@camelid
Copy link
Member Author

camelid commented Sep 22, 2021

The stdlib is still on Rust 2018, but I don't think that should cause any issues since IIUC the syntax should still be compatible with Rust 2021.

@jyn514
Copy link
Member

jyn514 commented Sep 22, 2021

I think we should wait until all parts of rust-lang/rust are converted. 2021 has lex errors that 2018 doesn't. (Have you tested running --edition 2021 on master?)

@camelid
Copy link
Member Author

camelid commented Sep 22, 2021

I think we should wait until all parts of rust-lang/rust are converted. 2021 has lex errors that 2018 doesn't. (Have you tested running --edition 2021 on master?)

No I have not, but sure, it's fine to wait until the migration is complete. I don't think Rust 2021 introduces any syntax that would cause errors on Rust 2018, so I guess it should be fine to stick to Rust 2018 formatting for now 👍

@camelid camelid added S-blocked Status: this PR is blocked waiting for something and removed S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content labels Sep 22, 2021
@Mark-Simulacrum
Copy link
Member

FWIW, I'm not actually sure there's any new syntax in 2021 that would end up requiring rustfmt to be configured to 2021 rather than 2018. We should still do it, but I agree that slow playing it seems right.

@jyn514 jyn514 merged commit ceec906 into rust-lang:master Oct 10, 2021
@camelid camelid deleted the rustfmt-2021 branch October 10, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: this PR is blocked waiting for something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants