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

Add edition 2021. #79576

Merged
merged 4 commits into from
Jan 1, 2021
Merged

Add edition 2021. #79576

merged 4 commits into from
Jan 1, 2021

Conversation

m-ou-se
Copy link
Member

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

🎆 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
Copy link
Collaborator

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
Copy link
Member

jyn514 commented Nov 30, 2020

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

@m-ou-se
Copy link
Member Author

m-ou-se commented Nov 30, 2020

@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.

@pickfire
Copy link
Contributor

pickfire commented Dec 1, 2020

@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
Copy link
Member

jyn514 commented Dec 1, 2020

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

@m-ou-se
Copy link
Member Author

m-ou-se commented Dec 1, 2020

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
@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
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Dec 24, 2020

📌 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
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 24, 2020
Add edition 2021.

:fireworks: Happy new ~~year~~ edition. :champagne:

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.
```
@bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 1, 2021

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
Copy link
Contributor

bors commented Jan 1, 2021

📌 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: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Jan 1, 2021
@bors
Copy link
Contributor

bors commented Jan 1, 2021

⌛ Testing commit 3cbdbe8 with merge f8ab56b...

@bors
Copy link
Contributor

bors commented Jan 1, 2021

☀️ 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
Copy link
Collaborator

📣 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).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 1, 2021
Tested on commit rust-lang/rust@f8ab56b.
Direct link to PR: <rust-lang/rust#79576>

💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).
@m-ou-se m-ou-se deleted the 2021 branch January 1, 2021 08:25
bors added a commit to rust-lang/cargo that referenced this pull request Jan 5, 2021
Add support for Rust edition 2021.

This adds support for `ediiton = "2021"`.

Related `rustc` PR: rust-lang/rust#79576
@pravic pravic mentioned this pull request Jan 8, 2021
2 tasks
bors added a commit to rust-lang/rls that referenced this pull request Jan 10, 2021
Add edition 2021.

See rust-lang/rust#80576. This un-breaks the build of RLS after rust-lang/rust#79576 broke it.
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