From 0ed0eef71a2439299aa2ca2874e7d04417d236d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 31 Dec 2017 16:21:47 +1300 Subject: [PATCH] Highlight recommended path and lowlight the rest Instead of placing the link to the recommended resource i.e. the second edition in second place, push it up to the top of the list. In fact, push the link to the first edition always at the bottom. To emphasise even more that's where new visitors should go, bolden the first link, and make the first-ed link smaller. All this as well as a slight edit and simplification of the copy is designed to make the new and recommended resources the primary path readers take, without hiding the old resource completely. --- redirects/associated-types.md | 10 ++++------ redirects/attributes.md | 12 ++++-------- redirects/bibliography.md | 7 +++---- redirects/borrow-and-asref.md | 9 +++------ redirects/casting-between-types.md | 13 +++++-------- redirects/choosing-your-guarantees.md | 10 ++++------ redirects/closures.md | 10 ++++------ redirects/comments.md | 10 ++++------ redirects/compiler-plugins.md | 11 ++++++----- redirects/concurrency.md | 10 ++++------ redirects/conditional-compilation.md | 16 +++++++--------- redirects/const-and-static.md | 13 +++++-------- redirects/crates-and-modules.md | 11 ++++------- redirects/deref-coercions.md | 10 ++++------ redirects/documentation.md | 10 ++++------ redirects/drop.md | 10 ++++------ redirects/effective-rust.md | 8 +++----- redirects/enums.md | 10 ++++------ redirects/error-handling.md | 10 ++++------ redirects/ffi.md | 10 ++++------ redirects/functions.md | 10 ++++------ redirects/generics.md | 10 ++++------ redirects/getting-started.md | 8 ++++---- redirects/glossary.md | 8 +++----- redirects/guessing-game.md | 9 ++++----- redirects/if-let.md | 10 ++++------ redirects/if.md | 10 ++++------ redirects/iterators.md | 10 ++++------ redirects/lifetimes.md | 11 ++++------- redirects/loops.md | 10 ++++------ redirects/macros.md | 12 ++++-------- redirects/match.md | 11 ++++------- redirects/method-syntax.md | 10 ++++------ redirects/mutability.md | 10 ++++------ redirects/operators-and-overloading.md | 11 ++++------- redirects/ownership.md | 10 ++++------ redirects/patterns.md | 11 ++++------- redirects/primitive-types.md | 10 ++++------ redirects/procedural-macros.md | 12 ++++-------- redirects/raw-pointers.md | 10 ++++------ redirects/references-and-borrowing.md | 10 ++++------ redirects/release-channels.md | 15 ++++++--------- redirects/strings.md | 12 ++++-------- redirects/structs.md | 10 ++++------ redirects/syntax-and-semantics.md | 10 ++++------ redirects/syntax-index.md | 12 +++++------- redirects/testing.md | 10 ++++------ redirects/the-stack-and-the-heap.md | 10 ++++------ redirects/trait-objects.md | 10 ++++------ redirects/traits.md | 11 ++++------- redirects/type-aliases.md | 10 ++++------ redirects/ufcs.md | 10 ++++------ redirects/unsafe.md | 11 ++++------- redirects/unsized-types.md | 10 ++++------ .../using-rust-without-the-standard-library.md | 12 ++++-------- redirects/variable-bindings.md | 10 ++++------ redirects/vectors.md | 10 ++++------ 57 files changed, 234 insertions(+), 362 deletions(-) diff --git a/redirects/associated-types.md b/redirects/associated-types.md index 24322f6697..6c259ccd25 100644 --- a/redirects/associated-types.md +++ b/redirects/associated-types.md @@ -1,6 +1,6 @@ % Associated Types -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Associated types are a way of associating a type placeholder with a trait such that the trait method definitions can use these placeholder types in their signatures. @@ -13,12 +13,10 @@ pub trait Iterator { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.30 — Associated Types][1] - -* [In the second edition: Ch 19.03 — Advanced Traits][2] +* **[In the second edition: Ch 19.03 — Advanced Traits][2]** +* [In the first edition: Ch 3.30 — Associated Types][1] [1]: first-edition/associated-types.html diff --git a/redirects/attributes.md b/redirects/attributes.md index f86e779783..2d7b05d065 100644 --- a/redirects/attributes.md +++ b/redirects/attributes.md @@ -1,6 +1,6 @@ % Attributes -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Any item declaration may have an attribute applied to it. @@ -14,14 +14,10 @@ fn test_foo() { --- -You can [continue to the exact older page][1]. +Here are the relevant sections in the new and old books: -This particular chapter does not exist in the second edition. -The best place to learn about it is [the Rust Reference][2]. - -* [In the first edition: Ch 3.27 — Attributes][1] - -* [In the Rust Reference: Ch 5.3 — Attributes][2] +* **[In the Rust Reference: Ch 5.3 — Attributes][2]** +* [In the first edition: Ch 3.27 — Attributes][1] [1]: first-edition/attributes.html diff --git a/redirects/bibliography.md b/redirects/bibliography.md index 9fca532f22..740a26b3d3 100644 --- a/redirects/bibliography.md +++ b/redirects/bibliography.md @@ -1,14 +1,13 @@ % Bibliography -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. +There is a new edition of the book and this is an old link. This page does not exist in [the second edition][2]. You might be interested in a similar page in [the Rust Reference][3]. -* [In the first edition: Section 7 — Bibliography][1] +* **[In the Rust Reference: Appendix — Influences][3]** +* [In the first edition: Section 7 — Bibliography][1] -* [In the Rust Reference: Appendix — Influences][3] [1]: first-edition/bibliography.html [2]: second-edition/index.html diff --git a/redirects/borrow-and-asref.md b/redirects/borrow-and-asref.md index 3968d651c1..2b8255bf19 100644 --- a/redirects/borrow-and-asref.md +++ b/redirects/borrow-and-asref.md @@ -1,6 +1,6 @@ % Borrow and AsRef -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > A cheap reference-to-reference conversion. > Used to convert a value to a reference value within generic code. @@ -13,14 +13,11 @@ fn is_hello>(s: T) { --- -You can [continue to the exact older page][1]. - This chapter does not exist in [the second edition][2]. The best place to learn more about this is [the Rust documentation][3]. -* [In the first edition: Ch 4.10 — Borrow and AsRef][1] - -* [In the Rust documentation: `convert::AsRef`][3] +* **[In the Rust documentation: `convert::AsRef`][3]** +* [In the first edition: Ch 4.10 — Borrow and AsRef][1] [1]: first-edition/borrow-and-asref.html diff --git a/redirects/casting-between-types.md b/redirects/casting-between-types.md index 6befc78db6..7aeaf86f22 100644 --- a/redirects/casting-between-types.md +++ b/redirects/casting-between-types.md @@ -1,6 +1,6 @@ % Casting between types -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > A type cast expression is denoted with the binary operator `as`. > Executing an `as` expression casts the value on the left-hand side to the type on the right-hand side. @@ -18,16 +18,13 @@ fn average(values: &[f64]) -> f64 { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.29 — Casting between types][1] - -* [In the second edition: Appendix B — Operators][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Appendix B — Operators, section Type Cast Expressions][2]** * [In the Rust Reference: Type Cast Expressions][3] - * [In the Rust documentation: `mem::transmute`][4] +* [In the first edition: Ch 3.29 — Casting between types][1] + [1]: first-edition/casting-between-types.html [2]: second-edition/appendix-02-operators.html#type-cast-expressions diff --git a/redirects/choosing-your-guarantees.md b/redirects/choosing-your-guarantees.md index 8dc2bf448c..e2205284b0 100644 --- a/redirects/choosing-your-guarantees.md +++ b/redirects/choosing-your-guarantees.md @@ -1,6 +1,6 @@ % Choosing your Guarantees -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Smart pointers are data structures that act like a pointer, but they also have additional metadata and capabilities. > The different smart pointers defined in Rust’s standard library provide extra functionality beyond what references provide. @@ -12,12 +12,10 @@ println!("b = {}", b); --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.8 — Choosing your Guarantees][1] - -* [In the second edition: Ch 15.00 — Smart Pointers][2] +* **[In the second edition: Ch 15.00 — Smart Pointers][2]** +* [In the first edition: Ch 4.8 — Choosing your Guarantees][1] [1]: first-edition/choosing-your-guarantees.html diff --git a/redirects/closures.md b/redirects/closures.md index d246945226..f17cbc1814 100644 --- a/redirects/closures.md +++ b/redirects/closures.md @@ -1,6 +1,6 @@ % Closures -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Anonymous functions you can save in a variable or pass as arguments to other functions. @@ -18,12 +18,10 @@ let expensive_closure = |num| { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.23 — Closures][1] - -* [In the second edition: Ch 13.01 — Closures][2] +* **[In the second edition: Ch 13.01 — Closures][2]** +* [In the first edition: Ch 3.23 — Closures][1] [1]: first-edition/closures.html diff --git a/redirects/comments.md b/redirects/comments.md index 2671526287..7766940fe7 100644 --- a/redirects/comments.md +++ b/redirects/comments.md @@ -1,6 +1,6 @@ % Comments -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Comments must start with two slashes and continue until the end of the line. > For comments that extend beyond a single line, you’ll need to include // on each line. @@ -13,12 +13,10 @@ There is a new edition of the book and this is an old link. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.4 — Comments][1] - -* [In the second edition: Ch 3.04 — Comments][2] +* **[In the second edition: Ch 3.04 — Comments][2]** +* [In the first edition: Ch 3.4 — Comments][1] [1]: first-edition/comments.html diff --git a/redirects/compiler-plugins.md b/redirects/compiler-plugins.md index 5c9cd26674..fafeda3ea6 100644 --- a/redirects/compiler-plugins.md +++ b/redirects/compiler-plugins.md @@ -1,15 +1,16 @@ % Compiler Plugins -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Compiler plugins are user-provided libraries that extend the compiler's behavior with new syntax extensions, lint checks, etc. --- -You can [continue to the exact older page][1]. +This particular chapter has moved to [the Unstable Book][2]. + +* **[In the Unstable Rust Book: `plugin`][2]** +* [In the first edition: Compiler Plugins][1] (does not exist anymore) -This particular chapter has moved to [a chapter in the Unstable -Book][unstable book plugins]. Please check it out there. [1]: first-edition/compiler-plugins.html -[unstable book plugins]: ../unstable-book/language-features/plugin.html +[2]: ../unstable-book/language-features/plugin.html diff --git a/redirects/concurrency.md b/redirects/concurrency.md index a3e2742b27..c2b96a55a3 100644 --- a/redirects/concurrency.md +++ b/redirects/concurrency.md @@ -1,18 +1,16 @@ % Concurrency -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Historically, programming [concurrency] has been difficult and error prone: Rust hopes to change that. > Fearless concurrency allows you to write code that’s free of subtle bugs and is easy to refactor without introducing new bugs. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.6 — Concurrency][1] - -* [In the second edition: Ch 16.00 — Fearless Concurrency][2] +* **[In the second edition: Ch 16.00 — Fearless Concurrency][2]** +* [In the first edition: Ch 4.6 — Concurrency][1] [1]: first-edition/concurrency.html diff --git a/redirects/conditional-compilation.md b/redirects/conditional-compilation.md index dcd1e905ed..24deb11c2b 100644 --- a/redirects/conditional-compilation.md +++ b/redirects/conditional-compilation.md @@ -1,6 +1,6 @@ % Conditional Compilation -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Sometimes one wants to have different compiler outputs from the same code, depending on build target, such as targeted operating system, or to enable release builds. > Configuration options are either provided by the compiler or passed in on the command line using. @@ -16,15 +16,13 @@ fn macos_only() { --- -You can [continue to the exact older page][1]. +This particular chapter does not exist in [the second edition][2]. +The best place to learn about it is [the Rust Reference][3]. -This particular chapter does not exist in the second edition. -The best place to learn about it is [the Rust Reference][2]. - -* [In the first edition: Ch 4.3 — Conditional Compilation][1] - -* [In the Rust Reference: Ch 5.3 — Attributes, Conditional Compilation section][2] +* **[In the Rust Reference: Ch 5.3 — Attributes, Conditional Compilation section][3]** +* [In the first edition: Ch 4.3 — Conditional Compilation][1] [1]: first-edition/conditional-compilation.html -[2]: ../reference/attributes.html#conditional-compilation +[2]: second-edition/ +[3]: ../reference/attributes.html#conditional-compilation diff --git a/redirects/const-and-static.md b/redirects/const-and-static.md index e39c93616c..2d7014a24f 100644 --- a/redirects/const-and-static.md +++ b/redirects/const-and-static.md @@ -1,6 +1,6 @@ % `const` and `static` -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Constants are _always_ immutable, and may only be set to a constant expression, not the result of a function call or any other value that could only be computed at runtime. > @@ -13,14 +13,11 @@ static HELLO_WORLD: &str = "Hello, world!"; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.26 — `const` and `static`][1] - -* [In the second edition: Ch 3.01 — Variables and Mutability, section Constants][2] - -* [In the second edition: Ch 19.01 — Unsafe Rust, section Static Variables][3] +* **[In the second edition: Ch 3.01 — Variables and Mutability, section Constants][2]** +* **[In the second edition: Ch 19.01 — Unsafe Rust, section Static Variables][3]** +* [In the first edition: Ch 3.26 — `const` and `static`][1] [1]: first-edition/const-and-static.html diff --git a/redirects/crates-and-modules.md b/redirects/crates-and-modules.md index 21d1983706..3796ed37d4 100644 --- a/redirects/crates-and-modules.md +++ b/redirects/crates-and-modules.md @@ -1,6 +1,6 @@ % Crates and Modules -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust has a module system that enables the reuse of code in an organized fashion. > A module is a namespace that contains definitions of functions or types, and you can choose whether those definitions are visible outside their module (public) or not (private). @@ -16,14 +16,11 @@ mod network { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.25 — Crates and Modules][1] - -* [In the second edition: Ch 7.01 — `mod` and the Filesystem][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 7.01 — `mod` and the Filesystem][2]** * [In the second edition: Ch 14.02 — Publishing a Crate to Crates.io][2] +* [In the first edition: Ch 3.25 — Crates and Modules][1] [1]: first-edition/crates-and-modules.html diff --git a/redirects/deref-coercions.md b/redirects/deref-coercions.md index 57d04d4864..29de95e66c 100644 --- a/redirects/deref-coercions.md +++ b/redirects/deref-coercions.md @@ -1,6 +1,6 @@ % Deref coercions -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Implementing the `Deref` trait allows us to customize the behavior of the _dereference operator_ `*`. > By implementing `Deref` in such a way that a smart pointer can be treated like a regular reference, we can write code that operates on references and use that code with smart pointers too. @@ -20,12 +20,10 @@ impl Deref for MyBox { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.33 — Deref coercions][1] - -* [In the second edition: Ch 15.02 — Treating Smart Pointers like Regular References with the `Deref` Trait][2] +* **[In the second edition: Ch 15.02 — Treating Smart Pointers like Regular References with the `Deref` Trait][2]** +* [In the first edition: Ch 3.33 — Deref coercions][1] [1]: first-edition/deref-coercions.html diff --git a/redirects/documentation.md b/redirects/documentation.md index 3c204155c8..64382f33c5 100644 --- a/redirects/documentation.md +++ b/redirects/documentation.md @@ -1,6 +1,6 @@ % Documentation -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Documentation comments use `///` instead of `//` and support Markdown notation for formatting the text if you’d like. > You place documentation comments just before the item they are documenting. @@ -22,12 +22,10 @@ pub fn add_one(x: i32) -> i32 { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.4 — Documentation][1] - -* [In the second edition: Ch 14.02 — Publishing to crates.io, section Making useful documentation][2] +* **[In the second edition: Ch 14.02 — Publishing to crates.io, section Making useful documentation][2]** +* [In the first edition: Ch 4.4 — Documentation][1] [1]: first-edition/documentation.html diff --git a/redirects/drop.md b/redirects/drop.md index 0c598313e3..f5f01e377e 100644 --- a/redirects/drop.md +++ b/redirects/drop.md @@ -1,6 +1,6 @@ % Drop -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > `Drop` lets us customize what happens when a value is about to go out of scope. @@ -24,12 +24,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.20 — Drop][1] - -* [In the second edition: Ch 15.03 — The `Drop` Trait Runs Code on Cleanup][2] +* **[In the second edition: Ch 15.03 — The `Drop` Trait Runs Code on Cleanup][2]** +* [In the first edition: Ch 3.20 — Drop][1] [1]: first-edition/drop.html diff --git a/redirects/effective-rust.md b/redirects/effective-rust.md index f3aabb24a8..60ca55d64b 100644 --- a/redirects/effective-rust.md +++ b/redirects/effective-rust.md @@ -1,15 +1,13 @@ % Effective Rust -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. +There is a new edition of the book and this is an old link. This section does not exist in [the second edition][2]. However, the second edition encourages writing effective Rust from the start. It is recommended to start there. -* [In the first edition: Ch 4 — Effective Rust][1] - -* [The second edition of The Rust Programming Language][2] +* **[The second edition of The Rust Programming Language][2]** +* [In the first edition: Ch 4 — Effective Rust][1] [1]: first-edition/effective-rust.html diff --git a/redirects/enums.md b/redirects/enums.md index 7fadbe2107..9b97970909 100644 --- a/redirects/enums.md +++ b/redirects/enums.md @@ -1,6 +1,6 @@ % Enums -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Enums allow you to define a type by enumerating its possible values. @@ -13,12 +13,10 @@ enum IpAddrKind { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.13 — Enums][1] - -* [In the second edition: Ch 6.01 — Defining an Enum][2] +* **[In the second edition: Ch 6.01 — Defining an Enum][2]** +* [In the first edition: Ch 3.13 — Enums][1] [1]: first-edition/enums.html diff --git a/redirects/error-handling.md b/redirects/error-handling.md index 5c2e698408..e915657ea4 100644 --- a/redirects/error-handling.md +++ b/redirects/error-handling.md @@ -1,17 +1,15 @@ % Error Handling -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust groups errors into two major categories: _recoverable_ errors with `Result` and _unrecoverable_ errors with `panic!`. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.7 — Error Handling][1] - -* [In the second edition: Ch 9.00 — Error Handling][2] +* **[In the second edition: Ch 9.00 — Error Handling][2]** +* [In the first edition: Ch 4.7 — Error Handling][1] [1]: first-edition/error-handling.html diff --git a/redirects/ffi.md b/redirects/ffi.md index 87d35e579b..1acb32b01f 100644 --- a/redirects/ffi.md +++ b/redirects/ffi.md @@ -1,6 +1,6 @@ % FFI -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Sometimes, your Rust code may need to interact with code written in another language. > To do this, Rust has a keyword, `extern`, that facilitates creating and using a _Foreign Function Interface_ (FFI). @@ -19,12 +19,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.9 — FFI][1] - -* [In the second edition: Ch 19.01 — Unsafe Rust, section `extern` functions][2] +* **[In the second edition: Ch 19.01 — Unsafe Rust, section `extern` functions][2]** +* [In the first edition: Ch 4.9 — FFI][1] [1]: first-edition/ffi.html diff --git a/redirects/functions.md b/redirects/functions.md index c11203a831..5c61fe56b3 100644 --- a/redirects/functions.md +++ b/redirects/functions.md @@ -1,6 +1,6 @@ % Functions -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Function definitions in Rust start with `fn` and have a set of parentheses after the function name. > The curly brackets tell the compiler where the function body begins and ends. @@ -20,12 +20,10 @@ fn another_function() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.2 — Functions][1] - -* [In the second edition: Ch 3.03 — Functions][2] +* **[In the first edition: Ch 3.2 — Functions][1]** +* [In the second edition: Ch 3.03 — Functions][2] [1]: first-edition/functions.html diff --git a/redirects/generics.md b/redirects/generics.md index 1b1ba53551..8e52802dfa 100644 --- a/redirects/generics.md +++ b/redirects/generics.md @@ -1,6 +1,6 @@ % Generics -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Generics are abstract stand-ins for concrete types or other properties. @@ -19,12 +19,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.18 — Generics][1] - -* [In the second edition: Ch 10.00 — Generic Types, Traits, and Lifetimes][2] +* **[In the second edition: Ch 10.00 — Generic Types, Traits, and Lifetimes][2]** +* [In the first edition: Ch 3.18 — Generics][1] [1]: first-edition/generics.html diff --git a/redirects/getting-started.md b/redirects/getting-started.md index 3f961b6962..168927c25a 100644 --- a/redirects/getting-started.md +++ b/redirects/getting-started.md @@ -1,12 +1,12 @@ % Getting Started -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. + You can [continue to the exact older page][1]. If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. -* [In the first edition: Getting Started][1] - -* [In the second edition: Introduction][2] +* **[In the second edition: Introduction][2]** +* [In the first edition: Getting Started][1] [1]: first-edition/getting-started.html diff --git a/redirects/glossary.md b/redirects/glossary.md index 8e63bddc09..c0fd384abd 100644 --- a/redirects/glossary.md +++ b/redirects/glossary.md @@ -1,15 +1,13 @@ % Glossary -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. +There is a new edition of the book and this is an old link. This section does not exist in [the second edition][2]. However, the second edition defines the terms it uses inline, rather than using a glossary. It is recommended to start there. -* [In the first edition: Glossary][1] - -* [The second edition of The Rust Programming Language][2] +* **[The second edition of The Rust Programming Language][2]** +* [In the first edition: Glossary][1] [1]: first-edition/glossary.html diff --git a/redirects/guessing-game.md b/redirects/guessing-game.md index 3a61173b60..3a243dd4b8 100644 --- a/redirects/guessing-game.md +++ b/redirects/guessing-game.md @@ -1,12 +1,11 @@ % Tutorial: Guessing Game -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +There is a new edition of the book and this is an old link. -* [In the first edition: Tutorial — Guessing Game][1] +If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. -* [In the second edition: Ch 2.00 — Guessing Game tutorial][2] +* **[In the first edition: Tutorial — Guessing Game][1]** +* [In the second edition: Ch 2.00 — Guessing Game tutorial][2] [1]: first-edition/guessing-game.html diff --git a/redirects/if-let.md b/redirects/if-let.md index 243e4d71fc..95da06a455 100644 --- a/redirects/if-let.md +++ b/redirects/if-let.md @@ -1,6 +1,6 @@ % if let -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > The `if let` syntax lets you combine `if` and `let` into a less verbose way to handle values that match one pattern and ignore the rest. @@ -13,12 +13,10 @@ if let Some(3) = some_u8_value { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.21 — if let][1] - -* [In the second edition: Ch 6.03 — Concise Control Flow with `if let`][2] +* **[In the second edition: Ch 6.03 — Concise Control Flow with `if let`][2]** +* [In the first edition: Ch 3.21 — if let][1] [1]: first-edition/if-let.html diff --git a/redirects/if.md b/redirects/if.md index dcc90c1eac..cf933a44d0 100644 --- a/redirects/if.md +++ b/redirects/if.md @@ -1,6 +1,6 @@ % if -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > An `if` expression allows us to branch our code depending on conditions. @@ -18,12 +18,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.5 — if][1] - -* [In the second edition: Ch 3.05 — Control flow][2] +* **[In the second edition: Ch 3.05 — Control flow][2]** +* [In the first edition: Ch 3.5 — if][1] [1]: first-edition/if.html diff --git a/redirects/iterators.md b/redirects/iterators.md index 6169fce92b..03c7134126 100644 --- a/redirects/iterators.md +++ b/redirects/iterators.md @@ -1,6 +1,6 @@ % Iterators -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > The iterator pattern allows you to perform some task on a sequence of items in turn. > An iterator is responsible for the logic of iterating over each item and determining when the sequence has finished. @@ -17,12 +17,10 @@ for val in v1_iter { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.5 — Iterators][1] - -* [In the second edition: Ch 13.02 — Iterators][2] +* **[In the second edition: Ch 13.02 — Iterators][2]** +* [In the first edition: Ch 4.5 — Iterators][1] [1]: first-edition/iterators.html diff --git a/redirects/lifetimes.md b/redirects/lifetimes.md index 95dab6313f..e9a5492719 100644 --- a/redirects/lifetimes.md +++ b/redirects/lifetimes.md @@ -1,6 +1,6 @@ % Lifetimes -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Every reference in Rust has a lifetime, which is the scope for which that reference is valid. > Most of the time lifetimes are implicit and inferred. @@ -18,14 +18,11 @@ There is a new edition of the book and this is an old link. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.10 — Lifetimes][1] - -* [In the second edition: Ch 10.03 — Lifetimes][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 10.03 — Lifetimes][2]** * [In the second edition: Ch 19.02 — Advanced Lifetimes][3] +* [In the first edition: Ch 3.10 — Lifetimes][1] [1]: first-edition/lifetimes.html diff --git a/redirects/loops.md b/redirects/loops.md index 5a761558bd..cabe918b4b 100644 --- a/redirects/loops.md +++ b/redirects/loops.md @@ -1,6 +1,6 @@ % Loops -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust has three kinds of loops: `loop`, `while`, and `for`. > The `loop` keyword tells Rust to execute a block of code over and over again forever or until you explicitly tell it to stop. @@ -26,12 +26,10 @@ for element in a.iter() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.6 — Loops][1] - -* [In the second edition: Ch 3.05 — Control flow][2] +* **[In the second edition: Ch 3.05 — Control flow][2]** +* [In the first edition: Ch 3.6 — Loops][1] [1]: first-edition/loops.html diff --git a/redirects/macros.md b/redirects/macros.md index d5e9aaefbf..d1f7369b9e 100644 --- a/redirects/macros.md +++ b/redirects/macros.md @@ -1,6 +1,6 @@ % Macros -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > While functions and types abstract over code, macros abstract at a syntactic level. @@ -16,18 +16,14 @@ fn main() { --- -You can [continue to the exact older page][1]. - This chapter does not exist yet in [the second edition][2]. You can check out other resources that describe macros. -* [In the first edition: Ch 3.34 — Macros][1] - +* **[Rust By Example: Macros][3]** +* [In the Rust Reference: Ch 3.1 — Macros by Example][4] * [In the second edition: (future) Appendix E — Macros][2] +* [In the first edition: Ch 3.34 — Macros][1] -* [Rust By Example: Macros][3] - -* [In the Rust Reference: Ch 3.1 — Macros by Example][4] [1]: first-edition/macros.html [2]: second-edition/appendix-05-macros.html diff --git a/redirects/match.md b/redirects/match.md index a2129ed9f2..5a32215ab4 100644 --- a/redirects/match.md +++ b/redirects/match.md @@ -1,6 +1,6 @@ % Match -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > `match` allows us to compare a value against a series of patterns and then execute code based on which pattern matches. > Patterns can be made up of literal values, variable names, wildcards, and many other things. @@ -25,14 +25,11 @@ fn value_in_cents(coin: Coin) -> u32 { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.14 — Match][1] - -* [In the second edition: Ch 6.02 — The `match` Control Flow Operator][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 6.02 — The `match` Control Flow Operator][2]** * [In the second edition: Ch 18.00 — Patterns][3] +* [In the first edition: Ch 3.14 — Match][1] [1]: first-edition/match.html diff --git a/redirects/method-syntax.md b/redirects/method-syntax.md index 06346a4f4c..a842c9badb 100644 --- a/redirects/method-syntax.md +++ b/redirects/method-syntax.md @@ -1,6 +1,6 @@ % Method Syntax -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Methods are different from functions in that they’re defined within the context of a struct, and their first parameter is always `self`, which represents the instance of the struct the method is being called on. @@ -19,12 +19,10 @@ impl Rectangle { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.16 — Method Syntax][1] - -* [In the second edition: Ch 5.03 — Method Syntax][2] +* **[In the second edition: Ch 5.03 — Method Syntax][2]** +* [In the first edition: Ch 3.16 — Method Syntax][1] [1]: first-edition/method-syntax.html diff --git a/redirects/mutability.md b/redirects/mutability.md index e89e848533..6f48bc3065 100644 --- a/redirects/mutability.md +++ b/redirects/mutability.md @@ -1,6 +1,6 @@ % Mutability -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Variables are immutable only by default; we can make them mutable by adding mut in front of the variable name. @@ -13,12 +13,10 @@ println!("The value of x is: {}", x); --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.11 — Mutability][1] - -* [In the second edition: Ch 3.01 — Variables and Mutability][2] +* **[In the second edition: Ch 3.01 — Variables and Mutability][2]** +* [In the first edition: Ch 3.11 — Mutability][1] [1]: first-edition/mutability.html diff --git a/redirects/operators-and-overloading.md b/redirects/operators-and-overloading.md index 02f83b7489..6cb8899b52 100644 --- a/redirects/operators-and-overloading.md +++ b/redirects/operators-and-overloading.md @@ -1,6 +1,6 @@ % Operators and Overloading -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust does not allow you to create your own operators or overload arbitrary operators, but the operations and corresponding traits listed in `std::ops` can be overloaded by implementing the traits associated with the operator. @@ -32,14 +32,11 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.32 — Operators and Overloading][1] - -* [In the second edition: Ch 19.03 — Advanced Traits, section Operator Overloading][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 19.03 — Advanced Traits, section Operator Overloading][2]** * [In the Rust documentation: `std::ops`][3] +* [In the first edition: Ch 3.32 — Operators and Overloading][1] [1]: first-edition/operators-and-overloading.html [2]: second-edition/ch19-03-advanced-traits.html#operator-overloading-and-default-type-parameters diff --git a/redirects/ownership.md b/redirects/ownership.md index b47e0b2a57..adca776217 100644 --- a/redirects/ownership.md +++ b/redirects/ownership.md @@ -1,6 +1,6 @@ % Ownership -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Ownership is Rust’s most unique feature, and it enables Rust to make memory safety guarantees without needing a garbage collector. > @@ -10,12 +10,10 @@ There is a new edition of the book and this is an old link. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.8 — Ownership][1] - -* [In the second edition: Ch 4.00 — Understanding Ownership][2] +* **[In the second edition: Ch 4.00 — Understanding Ownership][2]** +* [In the first edition: Ch 3.8 — Ownership][1] [1]: first-edition/ownership.html diff --git a/redirects/patterns.md b/redirects/patterns.md index 59136cf007..4044f16ab6 100644 --- a/redirects/patterns.md +++ b/redirects/patterns.md @@ -1,6 +1,6 @@ % Patterns -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Patterns are a special syntax within Rust for matching against the structure of our types, complex or simple. > A pattern is made up of some combination of literals; destructured arrays, enums, structs, or tuples; variables, wildcards, and placeholders. @@ -19,14 +19,11 @@ match x { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.15 — Patterns][1] - -* [In the second edition: Ch 18.03 — Patterns][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 18.03 — Patterns][2]** * [In the second edition: Ch 6.02 — Match][3] +* [In the first edition: Ch 3.15 — Patterns][1] [1]: first-edition/patterns.html diff --git a/redirects/primitive-types.md b/redirects/primitive-types.md index f5846e06ad..7244fbaa60 100644 --- a/redirects/primitive-types.md +++ b/redirects/primitive-types.md @@ -1,6 +1,6 @@ % Primitive Types -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust is a _statically typed_ language, which means that it must know the types of all variables at compile time. > The compiler can usually infer what type we want to use based on the value and how we use it. @@ -14,12 +14,10 @@ let y: f32 = 3.0; // f32 --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.3 — Primitive Types][1] - -* [In the second edition: Ch 3.02 — Data Types][2] +* **[In the second edition: Ch 3.02 — Data Types][2]** +* [In the first edition: Ch 3.3 — Primitive Types][1] [1]: first-edition/primitive-types.html diff --git a/redirects/procedural-macros.md b/redirects/procedural-macros.md index 5d47fe7f6b..66a7d463e2 100644 --- a/redirects/procedural-macros.md +++ b/redirects/procedural-macros.md @@ -1,23 +1,19 @@ % Procedural Macros (and custom Derive) -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Procedural macros allow for all sorts of advanced metaprogramming in Rust. --- -You can [continue to the exact older page][1]. - This chapter does not exist yet in [the second edition][2]. You can check out other resources that describe macros. -* [In the first edition: Ch 4.13 — Procedural Macros (and custom Derive)][1] - -* [In the second edition: Appendix E — Macros][2] - +* **[In the Rust Reference: Ch 3.2 — Procedural Macros][4]** * [The `proc_macro` crate documentation][3] +* [In the second edition: (future) Appendix E — Macros][2] +* [In the first edition: Ch 4.13 — Procedural Macros (and custom Derive)][1] -* [In the Rust Reference: Ch 3.2 — Procedural Macros][4] [1]: first-edition/procedural-macros.html [2]: second-edition/appendix-05-macros.html diff --git a/redirects/raw-pointers.md b/redirects/raw-pointers.md index 7c2f7f0686..08a6900d79 100644 --- a/redirects/raw-pointers.md +++ b/redirects/raw-pointers.md @@ -1,6 +1,6 @@ % Raw Pointers -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Raw pointers are allowed to ignore many of the rules that references have to follow. @@ -13,12 +13,10 @@ let r2 = &mut num as *mut i32; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.35 — Raw Pointers][1] - -* [In the second edition: Ch 19.01 — Unsafe Rust, section Dereferencing a Raw Pointer][2] +* **[In the second edition: Ch 19.01 — Unsafe Rust, section Dereferencing a Raw Pointer][2]** +* [In the first edition: Ch 3.35 — Raw Pointers][1] [1]: first-edition/raw-pointers.html diff --git a/redirects/references-and-borrowing.md b/redirects/references-and-borrowing.md index a44fb2d9b3..c3e29d671e 100644 --- a/redirects/references-and-borrowing.md +++ b/redirects/references-and-borrowing.md @@ -1,6 +1,6 @@ % References and Borrowing -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > A reference _refers_ to a value but does not own it. > Because it does not own it, the value it points to will not be dropped when the reference goes out of scope. @@ -14,12 +14,10 @@ fn calculate_length(s: &String) -> usize { // s is a reference to a String --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.9 — References and Borrowing][1] - -* [In the second edition: Ch 4.02 — References and Borrowing][2] +* **[In the second edition: Ch 4.02 — References and Borrowing][2]** +* [In the first edition: Ch 3.9 — References and Borrowing][1] [1]: first-edition/references-and-borrowing.html diff --git a/redirects/release-channels.md b/redirects/release-channels.md index 0ae1ea0f99..8c209e0e60 100644 --- a/redirects/release-channels.md +++ b/redirects/release-channels.md @@ -1,6 +1,6 @@ % Release Channels -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > The Rust project uses a concept called ‘release channels’ to manage releases. > New nightly releases are created once a day. @@ -8,20 +8,17 @@ There is a new edition of the book and this is an old link. > At that point, it will only receive patches to fix serious errors. > Six weeks later, the beta is promoted to ‘Stable’. -You can [continue to the exact older page][1]. +--- This chapter does not exist yet in [the second edition][2]. You can check out other resources that describe release channels. -* [In the first edition: Ch 4.11 — Release Channels][1] - -* [In the second edition: Appendix D — Nightly Rust][2] - +* **[In the Rustup documentation: Keeping Rust Up-to-date][4]** +* [On the website: Install Rust][5] * [In the Rust RFCs: RFC 507 — Release Channels][3] +* [In the second edition: (future) Appendix D — Nightly Rust][2] +* [In the first edition: Ch 4.11 — Release Channels][1] -* [In the Rustup documentation: Keeping Rust Up-to-date][4] - -* [On the website: Install Rust][5] [1]: first-edition/release-channels.html [2]: second-edition/appendix-04-nightly-rust.html diff --git a/redirects/strings.md b/redirects/strings.md index d7758115e1..2e50d9d88c 100644 --- a/redirects/strings.md +++ b/redirects/strings.md @@ -1,6 +1,6 @@ % Strings -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > A `String` is allocated on the heap and as such is able to store an amount of text that is unknown to us at compile time. > You can create a `String` from a string literal using the `from` function. @@ -15,16 +15,12 @@ let world = &s[6..11]; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.17 — Strings][1] - -* [In second edition: Ch 8.02 — Strings][2] +Here are the relevant sections in the new and old books: +* **[In second edition: Ch 8.02 — Strings][2]** * [In second edition: Ch 4.01 — Ownership, section The String Type][3] - * [In second edition: Ch 4.03 — Slices, section String Slices][4] +* [In the first edition: Ch 3.17 — Strings][1] [1]: first-edition/strings.html diff --git a/redirects/structs.md b/redirects/structs.md index a49393eebb..eb18820476 100644 --- a/redirects/structs.md +++ b/redirects/structs.md @@ -1,6 +1,6 @@ % Structs -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > A _struct_ is a custom data type that lets us name and package together multiple related values that make up a meaningful group. @@ -15,12 +15,10 @@ struct User { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.12 — Structs][1] - -* [In second edition: Ch 5.00 — Structs][2] +* **[In second edition: Ch 5.00 — Structs][2]** +* [In the first edition: Ch 3.12 — Structs][1] [1]: first-edition/structs.html diff --git a/redirects/syntax-and-semantics.md b/redirects/syntax-and-semantics.md index f42fa258bd..293f694fac 100644 --- a/redirects/syntax-and-semantics.md +++ b/redirects/syntax-and-semantics.md @@ -1,16 +1,14 @@ % Syntax and Semantics -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +There is a new edition of the book and this is an old link. -* [In the first edition: Ch 3 — Syntax and Semantics][1] +Here are the relevant sections in the new and old books: -* [In the second edition: Ch 3.00 — Common Programming Concepts][2] +* **[In the second edition: Ch 3.00 — Common Programming Concepts][2]** * [In the second edition: Appendix A — Keywords][3] - * [In the second edition: Appendix B — Operators][4] +* [In the first edition: Ch 3 — Syntax and Semantics][1] [1]: first-edition/syntax-and-semantics.html diff --git a/redirects/syntax-index.md b/redirects/syntax-index.md index d9a615cbd2..cd03b67205 100644 --- a/redirects/syntax-index.md +++ b/redirects/syntax-index.md @@ -1,14 +1,12 @@ % Syntax Index -There is a new edition of the book and this is an old link. -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +There is a new edition of the book and this is an old link. -* [In the first edition: Ch 6 — Syntax Index][1] +Here are the relevant sections in the new and old books: -* [In the second edition: Appendix A — Keywords][2] - -* [In the second edition: Appendix B — Operators][3] +* **[In the second edition: Appendix A — Keywords][2]** +* **[In the second edition: Appendix B — Operators][3]** +* [In the first edition: Ch 6 — Syntax Index][1] [1]: first-edition/syntax-index.html diff --git a/redirects/testing.md b/redirects/testing.md index 100331bc4b..79b325b8ed 100644 --- a/redirects/testing.md +++ b/redirects/testing.md @@ -1,6 +1,6 @@ % Testing -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust includes support for writing software tests within the language itself. @@ -15,12 +15,10 @@ mod tests { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.2 — Testing][1] - -* [In the second edition: Ch 11.00 — Testing][2] +* **[In the second edition: Ch 11.00 — Testing][2]** +* [In the first edition: Ch 4.2 — Testing][1] [1]: first-edition/testing.html diff --git a/redirects/the-stack-and-the-heap.md b/redirects/the-stack-and-the-heap.md index d97480bdfb..59938b6bf9 100644 --- a/redirects/the-stack-and-the-heap.md +++ b/redirects/the-stack-and-the-heap.md @@ -1,6 +1,6 @@ % The Stack and the Heap -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Both the stack and the heap are parts of memory that is available to your code to use at runtime, but they are structured in different ways. > The stack stores values in the order it gets them and removes the values in the opposite order. @@ -9,12 +9,10 @@ There is a new edition of the book and this is an old link. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 4.1 — The Stack and the Heap][1] - -* [In the second edition: Ch 4.01 — What is Ownership, section The Stack and the Heap][2] +* **[In the second edition: Ch 4.01 — What is Ownership, section The Stack and the Heap][2]** +* [In the first edition: Ch 4.1 — The Stack and the Heap][1] [1]: first-edition/the-stack-and-the-heap.html diff --git a/redirects/trait-objects.md b/redirects/trait-objects.md index 6e6ab13c9c..fb4a5b272b 100644 --- a/redirects/trait-objects.md +++ b/redirects/trait-objects.md @@ -1,6 +1,6 @@ % Trait Objects -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Trait objects combine the data made up of the pointer to a concrete object with the behavior of the methods defined in the trait. > A trait defines behavior that we need in a given situation. @@ -58,12 +58,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.22 — Trait Objects][1] - -* [In the second edition: Ch 17.02 — Trait Objects][2] +* **[In the second edition: Ch 17.02 — Trait Objects][2]** +* [In the first edition: Ch 3.22 — Trait Objects][1] [1]: first-edition/trait-objects.html diff --git a/redirects/traits.md b/redirects/traits.md index 41003162f3..baffad4a43 100644 --- a/redirects/traits.md +++ b/redirects/traits.md @@ -1,6 +1,6 @@ % Traits -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Traits abstract over behavior that types can have in common. @@ -12,14 +12,11 @@ pub trait Summarizable { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.19 — Traits][1] - -* [In the second edition: Ch 10.02 — Traits][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 10.02 — Traits][2]** * [In the second edition: Ch 19.03 — Advanced Traits][3] +* [In the first edition: Ch 3.19 — Traits][1] [1]: first-edition/traits.html diff --git a/redirects/type-aliases.md b/redirects/type-aliases.md index bb4e139839..33e9f1faf7 100644 --- a/redirects/type-aliases.md +++ b/redirects/type-aliases.md @@ -1,6 +1,6 @@ % `type` aliases -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust provides the ability to declare a _type alias_ with the `type` keyword to give an existing type another name. @@ -10,12 +10,10 @@ type Kilometers = i32; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.28 — `type` aliases][1] - -* [In the second edition: Ch 19.04 — Advanced Types, section Type Synonyms][2] +* **[In the second edition: Ch 19.04 — Advanced Types, section Type Synonyms][2]** +* [In the first edition: Ch 3.28 — `type` aliases][1] [1]: first-edition/type-aliases.html diff --git a/redirects/ufcs.md b/redirects/ufcs.md index f7153a98ca..1d530ca179 100644 --- a/redirects/ufcs.md +++ b/redirects/ufcs.md @@ -1,6 +1,6 @@ % Universal Function Call Syntax -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust cannot prevent a trait from having a method with the same name as another trait’s method, nor can it prevent us from implementing both of these traits on one type. > In order to be able to call each of the methods with the same name, then, we need to tell Rust which one we want to use. @@ -44,12 +44,10 @@ fn main() { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.24 — Universal Function Call Syntax][1] - -* [In the second edition: Ch 19.03 — Advanced Traits, section Fully Qualified Syntax][2] +* **[In the second edition: Ch 19.03 — Advanced Traits, section Fully Qualified Syntax][2]** +* [In the first edition: Ch 3.24 — Universal Function Call Syntax][1] [1]: first-edition/ufcs.html diff --git a/redirects/unsafe.md b/redirects/unsafe.md index 46b75ecaed..c14b414234 100644 --- a/redirects/unsafe.md +++ b/redirects/unsafe.md @@ -1,19 +1,16 @@ % `unsafe` -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust has a second language hiding out inside of it, unsafe Rust, which does not enforce memory safety guarantees. --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. - -* [In the first edition: Ch 3.36 — `unsafe`][1] - -* [In the second edition: Ch 19.01 — Unsafe Rust][2] +Here are the relevant sections in the new and old books: +* **[In the second edition: Ch 19.01 — Unsafe Rust][2]** * [The Rustonomicon, The Dark Arts of Advanced and Unsafe Rust Programming][3] +* [In the first edition: Ch 3.36 — `unsafe`][1] [1]: first-edition/unsafe.html diff --git a/redirects/unsized-types.md b/redirects/unsized-types.md index ed0122b0eb..d209c0d3bc 100644 --- a/redirects/unsized-types.md +++ b/redirects/unsized-types.md @@ -1,6 +1,6 @@ % Unsized Types -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Sometimes referred to as ‘DSTs’ or ‘unsized types’, these types let us talk about types whose size we can only know at runtime. > The `Sized` trait is automatically implemented for everything the compiler knows the size of at compile time. @@ -14,12 +14,10 @@ fn generic(t: &T) { --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.31 — Unsized Types][1] - -* [In the second edition: Ch 19.04 — Advanced Types, section Dynamically Sized Types][2] +* **[In the second edition: Ch 19.04 — Advanced Types, section Dynamically Sized Types][2]** +* [In the first edition: Ch 3.31 — Unsized Types][1] [1]: first-edition/unsized-types.html diff --git a/redirects/using-rust-without-the-standard-library.md b/redirects/using-rust-without-the-standard-library.md index 4de383d2cc..06deb6ee46 100644 --- a/redirects/using-rust-without-the-standard-library.md +++ b/redirects/using-rust-without-the-standard-library.md @@ -1,20 +1,16 @@ % Using Rust without the Standard Library -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Rust’s standard library provides a lot of useful functionality, but assumes support for various features of its host system: threads, networking, heap allocation, and others. > There are systems that do not have these features, however. --- -You can [continue to the exact older page][1]. +This particular chapter has moved to [the Unstable Book][2]. -This particular chapter has moved to [a chapter in the Unstable Book][2]. -Please check it out there. - -* [In the first edition: Ch 4.12 — Using Rust without the Standard Library][1] - -* [In the Unstable Rust Book: `lang_items` — Writing an executable without stdlib][2] +* **[In the Unstable Rust Book: `lang_items` — Writing an executable without stdlib][2]** +* [In the first edition: Ch 4.12 — Using Rust without the Standard Library][1] [1]: first-edition/using-rust-without-the-standard-library.html diff --git a/redirects/variable-bindings.md b/redirects/variable-bindings.md index 926b6a41c0..fcafa7e2af 100644 --- a/redirects/variable-bindings.md +++ b/redirects/variable-bindings.md @@ -1,6 +1,6 @@ % Variable Bindings -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Variable bindings bind some value to a name, so it can be used later. @@ -10,12 +10,10 @@ let foo = 5; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.1 — Variable Bindings][1] - -* [In the second edition: Ch 2.00 — Guessing Game Tutorial, section Variables][2] +* **[In the second edition: Ch 2.00 — Guessing Game Tutorial, section Variables][2]** +* [In the first edition: Ch 3.1 — Variable Bindings][1] [1]: first-edition/variable-bindings.html diff --git a/redirects/vectors.md b/redirects/vectors.md index 3550b87b8c..ac05844842 100644 --- a/redirects/vectors.md +++ b/redirects/vectors.md @@ -1,6 +1,6 @@ % Vectors -There is a new edition of the book and this is an old link. +There is a new edition of the book and this is an old link. > Vectors store more than one value in a single data structure that puts all the values next to each other in memory. > Vectors can only store values of the same type. @@ -12,12 +12,10 @@ let numbers = vec![1, 2, 3]; --- -You can [continue to the exact older page][1]. -If you're trying to learn Rust, checking out [the second edition][2] might be a better choice. +Here are the relevant sections in the new and old books: -* [In the first edition: Ch 3.7 — Vectors][1] - -* [In the second edition: Ch 8.01 — Vectors][2] +* **[In the second edition: Ch 8.01 — Vectors][2]** +* [In the first edition: Ch 3.7 — Vectors][1] [1]: first-edition/vectors.html