Commit Graph
2853 Commits
Author SHA1 Message Date
Carol (Nichols || Goulding) a619cc5f07 Fixes for ch3 tech review; backported through 2025-05-08 16:28:56 -05:00
Carol (Nichols || Goulding) aba1ee29dc Backport tech review changes from docx to src md 2025-04-08 14:24:27 -04:00
Chris Krycho bf3d2256c8 Ch. 21: call out Chrome multiple-connections issue
Fixes #3545

Co-authored by: Karen Sarkisyan <karen.sarkisyan01@gmail.com>
Co-authored by: Ludi Rehak <ludi317@gmail.com>
2025-03-21 17:21:09 -06:00
Chris Krycho 691c9581dc Merge pull request #4295 from mianlang/refactor
Ch. 16: refactor 16-6 to using listing component
2025-03-21 17:12:06 -06:00
mianlang e1c70a31c8 refactor 16-6 to using listing component 2025-03-22 01:02:02 +08:00
Chris Krycho a4f9417415 Ch. 01: Show how to work offline
Fixes #3279
2025-03-21 09:09:56 -06:00
Chris Krycho 72ad14e4ac Ch. 07: Clarify sentences about pub use
This is still a *bit* finicky, but it is slightly clearer than before,
and at least addresses the underlying issue here.

Fixes #3645
2025-03-21 08:41:23 -06:00
Chris Krycho 126e5fd411 Ch. 17: another tweak to how we phrase things about sections 2025-03-20 16:18:25 -06:00
mianlang 1d1424ba1c Ch. 20: correct listing number 2025-03-21 01:05:58 +08:00
Chris Krycho 21fcf73daf Merge pull request #4284 from reitzig/patch-1
Ch. 10.3: clarify language detail
2025-03-20 08:58:15 -06:00
Rick Rainey, CKA,CKS,CKAD,KCNAandChris Krycho 05f17f0d43 Ch. 17: minor typos and link reference (#4286)
Co-authored-by: Chris Krycho <hello@chriskrycho.com>
2025-03-20 08:16:11 -06:00
Raphael f6bd152fa7 Ch. 10.3: clarify language detail
The former phrasing seemed to suggest that we _must not_ annotate types _unless_ there are multiple possibilities.
In fact, we are allowed to add redundant annotations.

Cases where no annotation is needed _despite_ multiple possible types -- e.g. `let n = 8` -- are, presumably, intentionally left out here, so not touching that.
2025-03-18 11:37:14 +01:00
Chris Krycho a6bede67a2 Ch. 9: correctly demonstrate privacy with module
The code as actually written *did* conform to the expetaction of the
text, but only because it was in a `lib.rs` file and so in a module
distinct from the scope directly accessible from `main.rs`; as shown in
the text presentation, however, it was not obvious that it was in a
`lib.rs`, and that detail was elided.

Rename the `lib.rs` to `guessing_game.rs` and declare it as a module in
the `main.rs` file, update the `Listing` to name it, and update the text
to call out the creation of the module.
2025-03-17 17:15:42 -06:00
Chris Krycho 6156ff18b2 Merge pull request #4281 from rust-lang/state-option-etc
Ch. 18: correct discussion of delegation in `Post` methods
2025-03-17 17:02:40 -06:00
Chris Krycho 8904592b6f Ch. 18: correct discussion of delegation in Post methods
Fixes #3635
2025-03-17 16:57:53 -06:00
Chris Krycho 4b2590f90c Merge branch 'main' into tell-folks-abi-ref 2025-03-17 15:09:41 -06:00
Chris Krycho 39c34443e7 Merge pull request #4256 from km274/ch-10.1-minor-clarifications
Ch 10.1 minor clarifications
2025-03-17 14:20:48 -06:00
Chris Krycho 6dd246c12a Merge pull request #4232 from anu-sin-theta/main
Clarified the misunderstanding b/w crates, module, items
2025-03-17 13:58:12 -06:00
Chris Krycho 828d75c060 Update src/ch02-00-guessing-game-tutorial.md 2025-03-17 13:55:42 -06:00
Chris Krycho b021b72eef Ch. 17: mention use std::pin::{Pin, pin}; on introduction
Bonus: drop now-unnecessary `use std::future::Future` bits given it is
now part of the prelude as of the 2024 edition!

Fixes #4275
2025-03-17 10:26:14 -06:00
Chris Krycho 90ea905177 Merge pull request #4263 from proski/two-seconds
Typo: "2" should be "2 seconds"
2025-03-13 10:16:02 -06:00
Chris Krycho 56ec353290 More changes caught during ↔ backports for print edition 2025-03-13 08:11:51 -06:00
Chris Krycho 02e053cdbb nostarch: update Word documents with revisions from web version 2025-03-12 17:24:28 -06:00
Pavel Roskin c6f57828d7 Typo: "2" should be "2 seconds"
Remove extraneous "also" in the same paragraph.
2025-03-07 23:08:38 -08:00
km274 6c22ad7459 Clarify language explaining how the non-compiling listing would be fixed
"By following the help text’s suggestion, we restrict..." and "...and this example will compile..." imply to the reader that after this paragraph, they can expect to see a corrected code example. This rewording, though somewhat subtle, clarfies how the code example *would* be fixed by following the compiler's help message.
2025-03-03 17:20:48 -06:00
km274 694ec77f32 Remove "we'll fix it later in this chapter" for clarity
"we'll fix it later in this chapter" somewhat implies that a correct code example will be provided later; "later in this chapter" also implies "quite a bit later", when the fix is actually discussed very shortly after the non-compiling code is presented
2025-03-03 17:04:49 -06:00
Chris Krycho e5c8a0c99d Ch. 10: Make social media discussion generic.
Twitter is now X, who knows what 'tweets' are called, and whether *any*
of the current crop of social media platforms will exist by the time the
2027 or 2030 editions of Rust roll around, who knows?
2025-02-27 15:06:51 -07:00
Chris Krycho 6b65e95005 Another Ch. 17 -> 18 fix 2025-02-26 13:20:28 -07:00
Chris Krycho 063b1f8aff Ch. 05: further tweak to wording about user1 availability
This is a tricky thing to get “just right”, and I am not *totally* happy
with this solution, but I think it’s actually better without the “as a
whole” given the addition of the sentence at the end indicating that its
fields can still be accessed.
2025-02-26 12:52:43 -07:00
Chris Krycho 0ca2482a69 Ch. 19: Correct the discussion of fn type and closures 2025-02-25 15:50:33 -07:00
Chris Krycho 2800281fc4 Ch. 17: fresh-eyes edits
Or: what happens when you reread your own work after a couple months
away from it!
2025-02-25 10:10:33 -07:00
Chris Krycho 6ae5d86ca2 Ch. 17: drop lifetime not required in 2024 Edition
This makes for a nicely simpler introduction of this feature!
2025-02-25 09:27:14 -07:00
Chris Krycho ca030ddb09 Merge pull request #4240 from kpreid/patch-1
Appendix B, Operators: Replace “member access” with “field access” and “method call”.
2025-02-25 09:26:41 -07:00
Chris Krycho c7edf19e58 Merge pull request #4241 from rust-lang/2024-edition
Update to Rust 1.85 and 2024 Edition!
2025-02-25 09:26:10 -07:00
Chris Krycho 0833386eab Appendix B: restructure handling of . and parens
In Table B-8, instead of treating “tuples” as the primary concern, treat
parentheses as primary and tuples as one of the contexts. Move the tuple
index access to live alongside field and method access.
2025-02-25 09:10:29 -07:00
Chris Krycho b8b94b3d93 Rust 1.85/2024 Edition: update all edition references 2025-02-25 09:02:49 -07:00
Chris Krycho dac5234891 Rust 1.85/2024 Edition: manual regeneration changes 2025-02-25 07:50:55 -07:00
Chris Krycho 080147a27d Update to Rust 1.85 and 2024 Edition! 2025-02-24 13:55:20 -07:00
Chris Krycho 4958a5dbbc Merge pull request #4239 from rust-lang/fix-spacing-in-chapter-one
Chapter 1: fix 'four things' now that spacing is not emphasized
2025-02-24 11:36:27 -07:00
Kevin Reid 69980b8e85 Replace “member access” with “field access” and “method call”.
Rust doesn’t have a single “member access” operator, but two different operators both using the dot.
2025-02-24 10:03:46 -08:00
Chris Krycho e476d7b6fa Chapter 1: fix 'four things' now that spacing is not emphasized 2025-02-24 08:51:18 -07:00
Mario D'Andrea ba1646de18 Ch. 17: Fix typos 2025-02-23 15:58:40 +01:00
Anubhav Singh af84924b48 Crarified the misunderstanding b/w crates, module, items
The issue is while in std::io::stdin:  
std is the standard library in Rust.
io is a module within the std library.
stdin is a function within the io module, but the book said "io library" it does confused too much as a newbie the user won't impose his thoughts for a moment he/she will rather trust the BOOK that ::io is indeed a library (with confusion in his mind). so it needs to be fixed.
2025-02-18 22:23:58 +05:30
Chris Krycho 18f6e63e91 Merge pull request #4224 from rust-lang/nostarch-backports
NoStarch backports
2025-02-13 12:29:47 -07:00
Chris Krycho 5d22a358fb Backport fixes from NoStarch
This is an exhaustive pass in preparation for going the *other* way for
the 2024 Edition print update, i.e. the Third Edition of the print book.
2025-02-13 12:25:25 -07:00
Max Siling 8698ba57fc Fix example for cargo fix
Adding underscore to the start of an unused variable name is no longer
`MachineApplicable`, so the example no longer works.

This changes it to use `unused_mut` instead.
2025-02-11 13:01:18 +03:00
Hans Gerwitz 56cfe50929 Add missing word in ch17-04-streams.md 2025-02-01 15:30:38 +01:00
Chris Krycho d4b0a0f26b chore: reformat src with dprint 2025-01-22 10:10:47 -07:00
Chris Krycho 9b552dd133 Merge pull request #4209 from rust-lang/redirect-fix-chapter-gap-chaptest
Redirects: get rid of the weird gap in Ch. 20 sections!
2025-01-22 09:19:58 -07:00
Chris Krycho dc0613106f Redirects: get rid of the weird gap in Ch. 20 sections!
Bonus: fix internal *numbering* references in several places where I had
missed it when renumbering the links for the new Ch. 17.
2025-01-22 09:17:08 -07:00