-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: Add Edition2024
#12771
Merged
Merged
feat: Add Edition2024
#12771
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,7 @@ For the latest nightly, see the [nightly version] of this page. | |
* [codegen-backend](#codegen-backend) --- Select the codegen backend used by rustc. | ||
* [per-package-target](#per-package-target) --- Sets the `--target` to use for each individual package. | ||
* [artifact dependencies](#artifact-dependencies) --- Allow build artifacts to be included into other build artifacts and build them for different targets. | ||
* [Edition 2024](#edition-2024) — Adds support for the 2024 Edition. | ||
* Information and metadata | ||
* [Build-plan](#build-plan) --- Emits JSON information on which commands will be run. | ||
* [unit-graph](#unit-graph) --- Emits JSON for Cargo's internal graph structure. | ||
|
@@ -1271,6 +1272,32 @@ Differences between `cargo run --manifest-path <path>` and `cargo <path>` | |
|
||
### Documentation Updates | ||
|
||
## Edition 2024 | ||
* Tracking Issue: (none created yet) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No tracking issue has been created yet, so this will have to be updated to include a link when the RFC gets merged and a tracking issue gets created. If there is a tracking issue for |
||
* RFC: [rust-lang/rfcs#3501](https://github.com/rust-lang/rfcs/pull/3501) | ||
|
||
Support for the 2024 [edition] can be enabled by adding the `edition2024` | ||
unstable feature to the top of `Cargo.toml`: | ||
|
||
```toml | ||
cargo-features = ["edition2024"] | ||
|
||
[package] | ||
name = "my-package" | ||
version = "0.1.0" | ||
edition = "2024" | ||
``` | ||
|
||
If you want to transition an existing project from a previous edition, then | ||
`cargo fix --edition` can be used on the nightly channel. After running `cargo | ||
fix`, you can switch the edition to 2024 as illustrated above. | ||
|
||
This feature is very unstable, and is only intended for early testing and | ||
experimentation. Future nightly releases may introduce changes for the 2024 | ||
edition that may break your build. | ||
|
||
[edition]: ../../edition-guide/index.html | ||
|
||
# Stabilized and removed features | ||
|
||
## Compile progress | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While there currently is
rust_2024_compatibility
lint group, I set it tofalse
as there are no lints in the group currently (from what I can tell). This was howEdition2021
originally was before it was updated to betrue
.