Skip to content

Commit

Permalink
Fix links for book editions.
Browse files Browse the repository at this point in the history
Now that there is one book to rule them all, some of the links needed updating.

The prose needed significant adjustment to accommodate the most recent changes.
I did my best to capture what is going on, but I am not confident it is correct.
  • Loading branch information
ehuss committed Feb 28, 2019
1 parent 6f7ba84 commit f1bb1ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
34 changes: 16 additions & 18 deletions src/rust-2018/documentation/new-editions-of-the-book.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

![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 +17,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 dead-tree 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>`.

0 comments on commit f1bb1ea

Please sign in to comment.