Skip to content

Add edition 2021. - #79576

Merged
bors merged 4 commits into
rust-lang:masterfrom
m-ou-se:2021
Jan 1, 2021
Merged

bors merged 4 commits into
rust-lang:masterfrom
m-ou-se:2021

Conversation

@m-ou-se

@m-ou-se m-ou-se commented Nov 30, 2020 •

Copy link
Copy Markdown
Member

🎆 Happy new year Rust. 🍾

This adds --edition=2021, and updates suggestions about 2018 to say "2018 or later".

Related Cargo PR: rust-lang/cargo#8922


Edit: This adds the new edition as unstable. Without -Z unstable-options, --edition=2021 results in:

$ rustc --edition=2021
error: edition 2021 is unstable and only available with -Z unstable-options.

@rust-highfive

ghost commented Nov 30, 2020

Copy link
Copy Markdown
Contributor

r? @matthewjasper

(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 Nov 30, 2020
@jyn514

ghost commented Nov 30, 2020

Copy link
Copy Markdown
Member

rust-lang/rfcs#2966 hasn't been merged - are we sure there will be a 2021 edition?

@m-ou-se

ghost commented Nov 30, 2020

Copy link
Copy Markdown
Member Author

@jyn514 That RFC has 8 of the 9 checkboxes checked, and none of the remaining comments are about whether 2021 should exist. Both the libs and lang team have been talking about Rust 2021 as the next edition.

Comment thread compiler/rustc_parse/src/parser/expr.rs Resolved
@pickfire

ghost commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

@jyn514 That RFC has 8 of the 9 checkboxes checked, and none of the remaining comments are about whether 2021 should exist. Both the libs and lang team have been talking about Rust 2021 as the next edition.

I was looking at the patch and noticed that the change is just changing from 2018 to 2021. I wonder what is the point of editions if there are no breaking change? Why would one change from 2018 to 2021 if it is the same thing? If it is the same thing then most likely some crates will be 2018 and some will be 2021, will that slow down the compile time? But from the RFC looks like we have breaking change.

@jyn514

ghost commented Dec 1, 2020

Copy link
Copy Markdown
Member

@pickfire that's a question you should ask (and is already addressed) on rust-lang/rfcs#2966, not here.

@m-ou-se

ghost commented Dec 1, 2020

Copy link
Copy Markdown
Member Author

This adds 2021 as an unstable edition, such that we can start adding changes to that edition. Any 2021-specific changes can be added after this PR lands, before the new edition is made stable and default.

@m-ou-se m-ou-se added this to the Rust 2021 milestone Dec 18, 2020
Comment thread src/test/ui/hello2021.rs Resolved
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 23, 2020
@m-ou-se m-ou-se added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 24, 2020
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum

ghost commented Dec 24, 2020

Copy link
Copy Markdown
Member

@bors r+

Thanks!

@bors

ghost commented Dec 24, 2020

Copy link
Copy Markdown
Contributor

📌 Commit cfee9fb has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 24, 2020
@bors

ghost commented Dec 25, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit cfee9fb with merge 58cadeff6478eb14c76143aed50eb968385886c4...

@m-ou-se

ghost commented Dec 30, 2020

Copy link
Copy Markdown
Member Author

Rebased. This should be ready to merge on 2021-01-01 00:00 UTC, when the beta week ends. (Beta 1.50 is already branched off, but the check doesn't know that. Maybe we could make the check a bit smarter at some point.)

@camelid

ghost commented Dec 30, 2020

Copy link
Copy Markdown
Member

This should be ready to merge on 2021-01-01 00:00 UTC

It's kind of cool that Edition 2021 will be ready to merge right at the beginning of 2021 :)

@bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@m-ou-se

ghost commented Jan 1, 2021

Copy link
Copy Markdown
Member Author

This should be ready to merge on 2021-01-01 00:00 UTC, when the beta week ends.

This is now.

Happy new year! 🎆 🍾

@bors r=Mark-Simulacrum

@bors

ghost commented Jan 1, 2021

Copy link
Copy Markdown
Contributor

📌 Commit 3cbdbe8 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jan 1, 2021
@bors

ghost commented Jan 1, 2021

Copy link
Copy Markdown
Contributor

⌛ Testing commit 3cbdbe8 with merge f8ab56b...

@bors

ghost commented Jan 1, 2021

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing f8ab56b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 1, 2021
@bors
bors merged commit f8ab56b into rust-lang:master Jan 1, 2021
@rustbot rustbot modified the milestones: Rust 2021, 1.51.0 Jan 1, 2021
@rust-highfive

ghost commented Jan 1, 2021

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #79576!

Tested on commit f8ab56b.
Direct link to PR: #79576

💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants