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

Fix links for book editions. #149

Merged
merged 3 commits into from
May 4, 2019
Merged
Show file tree
Hide file tree
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
36 changes: 15 additions & 21 deletions src/rust-2018/documentation/new-editions-of-the-book.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# New editions of the "the book"

![Minimum Rust version: 1.18](https://img.shields.io/badge/Minimum%20Rust%20Version-1.18-red.svg) for drafts of the second edition

![Minimum Rust version: 1.26](https://img.shields.io/badge/Minimum%20Rust%20Version-1.26-brightgreen.svg) for the final version of the second edition

![Minimum Rust version: 1.28](https://img.shields.io/badge/Minimum%20Rust%20Version-1.28-red.svg) for drafts of the 2018 edition
![Minimum Rust version: 1.31](https://img.shields.io/badge/Minimum%20Rust%20Version-1.31-brightgreen.svg) for the 2018 edition

We've distributed a copy of "The Rust Programming Language," affectionately
nicknamed "the book", with every version of Rust since Rust 1.0.
Expand All @@ -15,23 +13,19 @@ details were nailed down for the 1.0 release. It didn't do a fantastic job of
teaching lifetimes.

Starting with Rust 1.18, we shipped drafts of a second edition of the book.
The final version was shipped with Rust 1.26. The new edition is a complete
The final version was shipped with Rust 1.26. The second edition is a complete
re-write from the ground up, using the last two years of knowledge we’ve
gained from teaching people Rust. You’ll find brand-new explanations for a
lot of Rust’s core concepts, new projects to build, and all kinds of other
good stuff. Please [check it
out](https://doc.rust-lang.org/book/second-edition/index.html) and let us
gained from teaching people Rust.

You can purchase [a printed version of the second edition from No Starch
Press](https://nostarch.com/Rust). Now that the print version has shipped, the
second edition is frozen.

As of 1.31, the book has been completely updated for the 2018 Edition release.
It's still pretty close to the second edition, but contains information about
newer features since the book's content was frozen. Additionally, instead of
publishing separate editions of the book, only the latest version of the book
is published online. You’ll find brand-new explanations for a lot of Rust’s
core concepts, new projects to build, and all kinds of other good stuff.
Please [check it out](https://doc.rust-lang.org/book/index.html) and let us
know what you think!

You can also purchase [a dead-tree version from No Starch
Press](https://nostarch.com/Rust). Now that the print version has shipped,
the second edition is frozen.

The names are a bit confusing though, because the "second edition" of the
book is the first printed edition of the book. As such, we decided that newer
editions of the book will correspond with newer editions of Rust itself, and
so starting with 1.28, we've been shipping drafts of the next version, [the
2018 Edition](https://doc.rust-lang.org/book/2018-edition/index.html). It's
still pretty close to the second edition, but contains information about
newer features since the book's content was frozen. We'll be continuing to
update this edition until we decide to print a second edition in paper.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Minimum Rust version: 1.2](https://img.shields.io/badge/Minimum%20Rust%20Version-1.2-brightgreen.svg)

In Rust 1.0, only certain, special types could be used to create [trait
objects](https://doc.rust-lang.org/book/second-edition/ch17-02-trait-objects.html).
objects](https://doc.rust-lang.org/book/ch17-02-trait-objects.html).

With Rust 1.2, that restriction was lifted, and more types became able to do this. For example,
`Rc<T>`, one of Rust's reference-counted types:
Expand All @@ -14,7 +14,7 @@ use std::rc::Rc;
trait Foo {}

impl Foo for i32 {

}

fn main() {
Expand All @@ -25,4 +25,4 @@ fn main() {
This code would not work with Rust 1.0, but now works.

> If you haven't seen the `dyn` syntax before, see the section on it. For
> versions that do not support it, replace `Rc<dyn Foo>` with `Rc<Foo>`.
> versions that do not support it, replace `Rc<dyn Foo>` with `Rc<Foo>`.