From 2b21dd920efc968b2a5723655b642667005fc3ad Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sun, 8 Apr 2018 01:43:59 +0000 Subject: [PATCH 1/3] decimal: Link to second edition of Rust book The goal was to explain that you can derive some traits. The Derivable Traits section of the book also serves this purpose, as it explains that `derive` automatically implements a trait, and enumerates the traits that you can derive. Note that https://doc.rust-lang.org/book/traits.html#deriving only links to two pages which don't seem like the best choice for this: * https://doc.rust-lang.org/book/second-edition/ch10-02-traits.html * https://doc.rust-lang.org/book/second-edition/ch19-03-advanced-traits.html Alternative to consider: Rust By Example (now a part of doc.rust-lang.org as of 1.25). https://doc.rust-lang.org/rust-by-example/trait/derive.html We'll choose the book unless there is a strong reason to choose another. Part of https://github.com/exercism/rust/issues/356 --- exercises/decimal/.meta/description.md | 2 +- exercises/decimal/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/decimal/.meta/description.md b/exercises/decimal/.meta/description.md index f6f313f39..1cd33c342 100644 --- a/exercises/decimal/.meta/description.md +++ b/exercises/decimal/.meta/description.md @@ -15,5 +15,5 @@ It would be very easy to implement this exercise by using the [bigdecimal](https # Hints - Instead of implementing arbitrary-precision arithmetic from scratch, consider building your type on top of the [num_bigint](https://crates.io/crates/num-bigint) crate. -- You might be able to [derive](https://doc.rust-lang.org/book/first-edition/traits.html#deriving) some of the required traits. +- You might be able to [derive](https://doc.rust-lang.org/book/second-edition/appendix-03-derivable-traits.html) some of the required traits. - `Decimal` is assumed to be a signed type. You do not have to create a separate unsigned type, though you may do so as an implementation detail if you so choose. diff --git a/exercises/decimal/README.md b/exercises/decimal/README.md index 5acf083bb..b0bcf6742 100644 --- a/exercises/decimal/README.md +++ b/exercises/decimal/README.md @@ -17,7 +17,7 @@ It would be very easy to implement this exercise by using the [bigdecimal](https # Hints - Instead of implementing arbitrary-precision arithmetic from scratch, consider building your type on top of the [num_bigint](https://crates.io/crates/num-bigint) crate. -- You might be able to [derive](https://doc.rust-lang.org/book/first-edition/traits.html#deriving) some of the required traits. +- You might be able to [derive](https://doc.rust-lang.org/book/second-edition/appendix-03-derivable-traits.html) some of the required traits. - `Decimal` is assumed to be a signed type. You do not have to create a separate unsigned type, though you may do so as an implementation detail if you so choose. ## Rust Installation From 6e68e3bf3bb1c567f18c80a02595e0b15d8ed84e Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sun, 8 Apr 2018 01:48:03 +0000 Subject: [PATCH 2/3] macros: Link to second edition of Rust book Visiting https://doc.rust-lang.org/book/macros.html leads to the suggestions: * https://doc.rust-lang.org/reference/macros-by-example.html * https://doc.rust-lang.org/book/second-edition/appendix-04-macros.html In addition, we may consider Rust By Example (now a part of the docs as of 1.25): https://doc.rust-lang.org/rust-by-example/macros.html We'll choose the book unless there is a strong reason to prefer another. Part of https://github.com/exercism/rust/issues/356 --- exercises/macros/.meta/description.md | 2 +- exercises/macros/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/macros/.meta/description.md b/exercises/macros/.meta/description.md index 22e8ba4fb..2a78a9f4c 100644 --- a/exercises/macros/.meta/description.md +++ b/exercises/macros/.meta/description.md @@ -8,7 +8,7 @@ What is a macro? [Wikipedia](https://en.wikipedia.org/wiki/Macro_(computer_scien Illuminating! But to be more concrete, macros are a special syntax which allows you to generate code at compile time. Macros can be used compile-time calculation, but more often they're just another way to abstract your code. For example, you've probably already used `println!()` and `vec![]`. These each take an arbitrary number of arguments, so you can't express them as simple functions. On the other hand, they always expand to some amount of absolutely standard Rust code. If you're interested, you can use the [cargo expand](https://github.com/dtolnay/cargo-expand) subcommand to view the results of macro expansion in your code. -For further information about macros in Rust, The Rust Book has a [good chapter](https://doc.rust-lang.org/book/first-edition/macros.html) on them. +For further information about macros in Rust, The Rust Book has a [good chapter](https://doc.rust-lang.org/book/second-edition/appendix-04-macros.html) on them. ## Problem Statement diff --git a/exercises/macros/README.md b/exercises/macros/README.md index 2f2275163..19b380b79 100644 --- a/exercises/macros/README.md +++ b/exercises/macros/README.md @@ -10,7 +10,7 @@ What is a macro? [Wikipedia](https://en.wikipedia.org/wiki/Macro_(computer_scien Illuminating! But to be more concrete, macros are a special syntax which allows you to generate code at compile time. Macros can be used compile-time calculation, but more often they're just another way to abstract your code. For example, you've probably already used `println!()` and `vec![]`. These each take an arbitrary number of arguments, so you can't express them as simple functions. On the other hand, they always expand to some amount of absolutely standard Rust code. If you're interested, you can use the [cargo expand](https://github.com/dtolnay/cargo-expand) subcommand to view the results of macro expansion in your code. -For further information about macros in Rust, The Rust Book has a [good chapter](https://doc.rust-lang.org/book/first-edition/macros.html) on them. +For further information about macros in Rust, The Rust Book has a [good chapter](https://doc.rust-lang.org/book/second-edition/appendix-04-macros.html) on them. ## Problem Statement From 7b2c0e9c1ac730c651c3e2c80c90085034966261 Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sun, 8 Apr 2018 01:59:18 +0000 Subject: [PATCH 3/3] parallel-letter-frequency: Link to second edition of Rust book https://doc.rust-lang.org/book/release-channels.html shows the following suggestions: * https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md#keeping-rust-up-to-date * https://www.rust-lang.org/en-US/install.html * https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md * https://doc.rust-lang.org/book/second-edition/ch01-03-how-rust-is-made-and-nightly-rust.html Of these, the second edition seems to most fit the purpose here: Explain the channels and how to use Nightly. The Rustup documentation is already being linked to. Part of https://github.com/exercism/rust/issues/356 --- exercises/parallel-letter-frequency/.meta/hints.md | 2 +- exercises/parallel-letter-frequency/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/parallel-letter-frequency/.meta/hints.md b/exercises/parallel-letter-frequency/.meta/hints.md index d45c755bd..23380218d 100644 --- a/exercises/parallel-letter-frequency/.meta/hints.md +++ b/exercises/parallel-letter-frequency/.meta/hints.md @@ -28,5 +28,5 @@ rustup run nightly cargo bench Learn more about nightly Rust: -- [Nightly Rust](https://doc.rust-lang.org/book/first-edition/release-channels.html) +- [Nightly Rust](https://doc.rust-lang.org/book/second-edition/ch01-03-how-rust-is-made-and-nightly-rust.html) - [Rustup: Working with nightly](https://github.com/rust-lang-nursery/rustup.rs#working-with-nightly-rust) diff --git a/exercises/parallel-letter-frequency/README.md b/exercises/parallel-letter-frequency/README.md index 8c81ed9fd..96c1d5ebb 100644 --- a/exercises/parallel-letter-frequency/README.md +++ b/exercises/parallel-letter-frequency/README.md @@ -37,7 +37,7 @@ rustup run nightly cargo bench Learn more about nightly Rust: -- [Nightly Rust](https://doc.rust-lang.org/book/first-edition/release-channels.html) +- [Nightly Rust](https://doc.rust-lang.org/book/second-edition/ch01-03-how-rust-is-made-and-nightly-rust.html) - [Rustup: Working with nightly](https://github.com/rust-lang-nursery/rustup.rs#working-with-nightly-rust)