Skip to content

Commit

Permalink
Update creating chapter for 2021.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Aug 28, 2021
1 parent 3710b0c commit 9da3401
Showing 1 changed file with 3 additions and 5 deletions.
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 <[email protected]>"]
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 <[email protected]>"]
edition = "2015"

[dependencies]
Expand Down

0 comments on commit 9da3401

Please sign in to comment.