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

Update creating chapter for 2021. #254

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/editions/creating-a-new-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ configuration for the latest edition:
```console
> cargo +nightly new foo
Created binary (application) `foo` project
> cat .\foo\Cargo.toml
> cat foo/Cargo.toml
[package]
name = "foo"
version = "0.1.0"
authors = ["your name <you@example.com>"]
edition = "2018"
edition = "2021"

[dependencies]
```

That `edition = "2018"` setting will configure your package to use Rust 2018.
That `edition = "2021"` setting will configure your package to use Rust 2021.
No more configuration needed!

If you'd prefer to use an older edition, you can change the value in that
Expand All @@ -26,7 +25,6 @@ key, for example:
[package]
name = "foo"
version = "0.1.0"
authors = ["your name <you@example.com>"]
edition = "2015"

[dependencies]
Expand Down