https://github.com/rust-lang/rust/pull/116412 will remove support for
compiler plugins from rustc, which includes the entry in The Rust
Unstable Book. This commit removes a link to that entry so it won't be
broken when that PR merges.
Per https://github.com/rust-lang/book/issues/3047, use captured identifiers instead of the positional ones for some examples, e.g.
```diff
- println!("Worker {} got a job; executing.", id);
+ println!("Worker {id} got a job; executing.");
```
Fix typo in Chapter 7 Section 3, changing "start an executable that calls code with the library crate." to "start an executable that calls code within the library crate."
When `rustup help` is run, it suggests using `rustup doc --book` rather than docs. While docs is a valid alias, I feel that both the book and the help should be the same.
When reading this section as HTML, these double hyphens stood out to me. It looks like this was introduced last year in #3135. I found other parts of the book where em dashes used standard Unicode em dash characters (rather than some Markdown representation) so I updated these to use them.
(Note that I actually think this would read more clearly if it used parentheses rather than em dashes, but I figured I'd start with the smallest possible suggestion.)
Removed extra comma on line 85.
We’ll cover types and type annotations in the next section, “Data Types`,`”, so don’t worry about the details right now.
According to Listing 11-9, the substring expected to be included is
"less than or equal to 100" (not "Guess value must be less than or equal
to 100" as written in the book, which is strictly speaking not the
expected substring - it's almost the entire panic message except the
final ", got {}." part). See
f2a78f64b6/listings/ch11-writing-automated-tests/listing-11-09/src/lib.rs (L31):
```rust
#[should_panic(expected = "less than or equal to 100")]
```
Also I think this was the only place in this chapter / in the book where
I saw a string quotation in inline code additionally surrounded with
single quotes `'`, so I removed them.
when installing rust on macos just copy pasting the command throw an error about curl, on the official rust-lang website the command uses tlsv1.2 and roll backing seems to fix the issue
`println!("x = {x} and y + 2 = {}", y + 2);`
"This code would print `x = 5 and y = 12`." is incorrect.
changed to "This code would print `x = 5 and y + 2 = 12`."