-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix typo in ch5.3 and in CONTRIBUTING.md #4216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update to CONTRIBUTING is correct and I’m happy to merge it, but the update to the text in chapter 5 is incorrect, so please drop that!
src/ch05-03-method-syntax.md
Outdated
| have a parameter named `self` of type `Self` for their first parameter, so Rust | ||
| lets you abbreviate this with only the name `self` in the first parameter spot. | ||
| Note that we still need to use the `&` in front of the `self` shorthand to | ||
| Note that we still need to use the `&` behind the `self` shorthand to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct: it’s &self, not self: &!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Chris!
Can you please double check this?
From my understanding, the sentence I changed refers to this first sentence:

The sentences in between thoroughly explain how &self works under the hood, but it hints we'll never use self: &Self (only just &self), so that's why I assumed the sentence referenced to just &self.
Please lmk the intended meaning so that I can maybe change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You’re corect that the sentence does refer to just &self; that’s exactly what “use the & i front of the self short hand” is saying. 😄 The & is “in front of” self here. There’s no need to change the sentence or its meaning; it’s already correct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for clarifying! I've dropped that change.
Very have to contribute :)
This reverts commit ed3d672.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update books ## rust-lang/book 2 commits in fa312a343fbff01bc6cef393e326817f70719813..e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45 2025-02-03 15:02:07 UTC to 2025-02-01 17:33:39 UTC - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) ## rust-lang/edition-guide 2 commits in 4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda..f56aecc3b036dff16404b525a83b00f911b9bbea 2025-02-03 17:14:16 UTC to 2025-01-31 17:44:00 UTC - Rustc{En,De}codable has been removed (rust-lang/edition-guide#353) - Remove rustfmt-overflow-delimited-expr (rust-lang/edition-guide#357) ## rust-lang/nomicon 3 commits in bc2298865544695c63454fc1f9f98a3dc22e9948..336f75835a6c0514852cc65aba9a698b699b13c8 2025-02-02 10:06:30 UTC to 2025-02-02 08:35:20 UTC - Improve grammar in exotic-sizes (rust-lang/nomicon#452) - other-reprs: Add details for n!=1 repr(packed) (rust-lang/nomicon#460) - Use `()` instead of `[u8; 0]` in opaque type (rust-lang/nomicon#456) ## rust-lang/reference 3 commits in 93b921c7d3213d38d920f7f905a3bec093d2217d..4249fb411dd27f945e2881eb0378044b94cee06f 2025-01-31 03:43:07 UTC to 2025-01-29 04:17:34 UTC - Add Spec Identifier Syntax to expressions.md and subchapters (rust-lang/reference#1591) - Exclude the test summary from the search index (rust-lang/reference#1723) - Spec inline assembly tests (rust-lang/reference#1648) ## rust-lang/rust-by-example 1 commits in 054259ed1bf01cdee4309ee764c7e103f6df3de5..743766929f1e53e72fab74394ae259bbfb4a7619 2025-02-02 19:53:31 UTC to 2025-02-02 19:53:31 UTC - Spanish translation to 1:2100 (rust-lang/rust-by-example#1910)
Update books ## rust-lang/book 2 commits in fa312a343fbff01bc6cef393e326817f70719813..e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45 2025-02-03 15:02:07 UTC to 2025-02-01 17:33:39 UTC - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) ## rust-lang/edition-guide 2 commits in 4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda..f56aecc3b036dff16404b525a83b00f911b9bbea 2025-02-03 17:14:16 UTC to 2025-01-31 17:44:00 UTC - Rustc{En,De}codable has been removed (rust-lang/edition-guide#353) - Remove rustfmt-overflow-delimited-expr (rust-lang/edition-guide#357) ## rust-lang/nomicon 3 commits in bc2298865544695c63454fc1f9f98a3dc22e9948..336f75835a6c0514852cc65aba9a698b699b13c8 2025-02-02 10:06:30 UTC to 2025-02-02 08:35:20 UTC - Improve grammar in exotic-sizes (rust-lang/nomicon#452) - other-reprs: Add details for n!=1 repr(packed) (rust-lang/nomicon#460) - Use `()` instead of `[u8; 0]` in opaque type (rust-lang/nomicon#456) ## rust-lang/reference 3 commits in 93b921c7d3213d38d920f7f905a3bec093d2217d..4249fb411dd27f945e2881eb0378044b94cee06f 2025-01-31 03:43:07 UTC to 2025-01-29 04:17:34 UTC - Add Spec Identifier Syntax to expressions.md and subchapters (rust-lang/reference#1591) - Exclude the test summary from the search index (rust-lang/reference#1723) - Spec inline assembly tests (rust-lang/reference#1648) ## rust-lang/rust-by-example 1 commits in 054259ed1bf01cdee4309ee764c7e103f6df3de5..743766929f1e53e72fab74394ae259bbfb4a7619 2025-02-02 19:53:31 UTC to 2025-02-02 19:53:31 UTC - Spanish translation to 1:2100 (rust-lang/rust-by-example#1910)
Rollup merge of rust-lang#136498 - rustbot:docs-update, r=ehuss Update books ## rust-lang/book 2 commits in fa312a343fbff01bc6cef393e326817f70719813..e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45 2025-02-03 15:02:07 UTC to 2025-02-01 17:33:39 UTC - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) ## rust-lang/edition-guide 2 commits in 4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda..f56aecc3b036dff16404b525a83b00f911b9bbea 2025-02-03 17:14:16 UTC to 2025-01-31 17:44:00 UTC - Rustc{En,De}codable has been removed (rust-lang/edition-guide#353) - Remove rustfmt-overflow-delimited-expr (rust-lang/edition-guide#357) ## rust-lang/nomicon 3 commits in bc2298865544695c63454fc1f9f98a3dc22e9948..336f75835a6c0514852cc65aba9a698b699b13c8 2025-02-02 10:06:30 UTC to 2025-02-02 08:35:20 UTC - Improve grammar in exotic-sizes (rust-lang/nomicon#452) - other-reprs: Add details for n!=1 repr(packed) (rust-lang/nomicon#460) - Use `()` instead of `[u8; 0]` in opaque type (rust-lang/nomicon#456) ## rust-lang/reference 3 commits in 93b921c7d3213d38d920f7f905a3bec093d2217d..4249fb411dd27f945e2881eb0378044b94cee06f 2025-01-31 03:43:07 UTC to 2025-01-29 04:17:34 UTC - Add Spec Identifier Syntax to expressions.md and subchapters (rust-lang/reference#1591) - Exclude the test summary from the search index (rust-lang/reference#1723) - Spec inline assembly tests (rust-lang/reference#1648) ## rust-lang/rust-by-example 1 commits in 054259ed1bf01cdee4309ee764c7e103f6df3de5..743766929f1e53e72fab74394ae259bbfb4a7619 2025-02-02 19:53:31 UTC to 2025-02-02 19:53:31 UTC - Spanish translation to 1:2100 (rust-lang/rust-by-example#1910)
Update books ## rust-lang/book 68 commits in 1d7c3e6abec2d5a9bfac798b29b7855b95025426..af415fc6c8a6823dfb4595074f27d5a3e9e2fe49 2025-10-20 14:01:39 UTC to 2025-01-21 22:49:39 UTC - Prepare for renaming of rust-lang/rust default branch (rust-lang/book#4534) - Adding Uzbek translated rust-book repository to the list (rust-lang/book#4387) - I have added Bengali Translation of The Book. (rust-lang/book#4476) - Add+ vietnamese language translate (rust-lang/book#4368) - Appendix B and Appendix D from tech review (rust-lang/book#4466) - Chapter 21 from tech review (rust-lang/book#4464) - Chapter 20 from tech review (rust-lang/book#4460) - Chapter 19 from tech review (rust-lang/book#4446) - Chapter 18 from tech review (rust-lang/book#4445) - Chapter 16 from tech review (rust-lang/book#4438) - WIP ch 17 edits after tech review (rust-lang/book#4319) - Chapter 15 from tech review (rust-lang/book#4433) - Chapter 14 from tech review (rust-lang/book#4423) - Chapter 13 from tech review (rust-lang/book#4421) - Chapter 12 from tech review (rust-lang/book#4410) - Chapter 11 from tech review (rust-lang/book#4391) - Chapter 10 from tech review (rust-lang/book#4379) - Chapter 9 from tech review (rust-lang/book#4377) - Chapter 8 from tech review (rust-lang/book#4378) - Chapter 7 from tech review (rust-lang/book#4374) - Chapter 6 from tech review (rust-lang/book#4370) - Chapter 5 from tech review (rust-lang/book#4359) - Chapter 4 from tech review (rust-lang/book#4358) - Chapter 3 from tech review (rust-lang/book#4353) - Ch01+ch02 after tech review (rust-lang/book#4329) - Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297) - Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295) - Ch. 01: Show how to work offline (rust-lang/book#4294) - Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293) - Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292) - Anchors on listings (rust-lang/book#4271) - Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288) - Ch. 20: correct listing number (rust-lang/book#4287) - Ch. 10.3: clarify language detail (rust-lang/book#4284) - Ch. 17: minor typos and link reference (rust-lang/book#4286) - Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282) - Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281) - Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165) - Ch 10.1 minor clarifications (rust-lang/book#4256) - Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232) - Ferris: always show, even when it’s small (rust-lang/book#4280) - Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279) - Persist printing error, NOT ErrorKind (rust-lang/book#4259) - Typo: "2" should be "2 seconds" (rust-lang/book#4263) - Ch. 17: fix tiny example consistency issue (rust-lang/book#4270) - Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261) - Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273) - 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272) - Ch. 10: Make social media discussion generic. (rust-lang/book#4249) - Another Ch. 17 -> 18 fix (rust-lang/book#4247) - Ch. 05: further tweak to wording about `user1` availability (rust-lang/book#4246) - Ch. 02: Fix rand version mistake (from testing) (rust-lang/book#4245) - Ch. 19: Correct the discussion of `fn` type and closures (rust-lang/book#4244) - Edition maintenance: scripting the updates for future work (rust-lang/book#4243) - Ch. 17: fresh-eyes edits (rust-lang/book#4242) - Ch. 17: drop lifetime not required in 2024 Edition (rust-lang/book#4212) - Appendix B, Operators: Replace “member access” with “field access” and “method call”. (rust-lang/book#4240) - Update to Rust 1.85 and 2024 Edition! (rust-lang/book#4241) - Chapter 1: fix 'four things' now that spacing is not emphasized (rust-lang/book#4239) - Fix typos in chapter 17 (rust-lang/book#4238) - NoStarch backports (rust-lang/book#4224) - Fix example for `cargo fix` (rust-lang/book#4226) - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) - chore: reformat src with dprint (rust-lang/book#4211) - Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209) - Document that `use` is also for `precise capturing` (rust-lang/book#4210) - Ch. 17: NoStarch Edits! (rust-lang/book#4206) ## rust-lang/nomicon 1 commits in 23fc2682f8fcb887f77d0eaabba708809f834c11..60f0b30d8ec1c9eb5c2582f2ec55f1094b0f8c42 2025-10-20 13:05:39 UTC to 2025-10-20 13:05:39 UTC - Fix typo in exception-safety.md (BinaryHeap::sift_up, user-defined and unsafe code separated) (rust-lang/nomicon#504) ## rust-lang/reference 11 commits in 8efb9805686722dba511b7b27281bb6b77d32130..752eab01cebdd6a2d90b53087298844c251859a1 2025-10-16 04:31:58 UTC to 2025-10-06 22:38:53 UTC - Clarify struct pattern binding shorthand (rust-lang/reference#2054) - Follow edition formatting for keywords (rust-lang/reference#2050) - generalise paragraph (rust-lang/reference#2047) - Rework the definitions of the extern ABIs (rust-lang/reference#2003) - Fix grammar of `ConstParam` (rust-lang/reference#2036) - Add a note to patterns.ident.precedent (rust-lang/reference#2022) - Add a description of how the reference is published (rust-lang/reference#2028) - Rearrange the README a little (rust-lang/reference#2029) - Consistently use sentence case (rust-lang/reference#2030) - More clearly define the default abi of an extern block (rust-lang/reference#2001) - fix(css): Correctly specify grammar-literal-bg (rust-lang/reference#2032)
Rollup merge of #147916 - rustbot:docs-update, r=ehuss Update books ## rust-lang/book 68 commits in 1d7c3e6abec2d5a9bfac798b29b7855b95025426..af415fc6c8a6823dfb4595074f27d5a3e9e2fe49 2025-10-20 14:01:39 UTC to 2025-01-21 22:49:39 UTC - Prepare for renaming of rust-lang/rust default branch (rust-lang/book#4534) - Adding Uzbek translated rust-book repository to the list (rust-lang/book#4387) - I have added Bengali Translation of The Book. (rust-lang/book#4476) - Add+ vietnamese language translate (rust-lang/book#4368) - Appendix B and Appendix D from tech review (rust-lang/book#4466) - Chapter 21 from tech review (rust-lang/book#4464) - Chapter 20 from tech review (rust-lang/book#4460) - Chapter 19 from tech review (rust-lang/book#4446) - Chapter 18 from tech review (rust-lang/book#4445) - Chapter 16 from tech review (rust-lang/book#4438) - WIP ch 17 edits after tech review (rust-lang/book#4319) - Chapter 15 from tech review (rust-lang/book#4433) - Chapter 14 from tech review (rust-lang/book#4423) - Chapter 13 from tech review (rust-lang/book#4421) - Chapter 12 from tech review (rust-lang/book#4410) - Chapter 11 from tech review (rust-lang/book#4391) - Chapter 10 from tech review (rust-lang/book#4379) - Chapter 9 from tech review (rust-lang/book#4377) - Chapter 8 from tech review (rust-lang/book#4378) - Chapter 7 from tech review (rust-lang/book#4374) - Chapter 6 from tech review (rust-lang/book#4370) - Chapter 5 from tech review (rust-lang/book#4359) - Chapter 4 from tech review (rust-lang/book#4358) - Chapter 3 from tech review (rust-lang/book#4353) - Ch01+ch02 after tech review (rust-lang/book#4329) - Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297) - Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295) - Ch. 01: Show how to work offline (rust-lang/book#4294) - Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293) - Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292) - Anchors on listings (rust-lang/book#4271) - Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288) - Ch. 20: correct listing number (rust-lang/book#4287) - Ch. 10.3: clarify language detail (rust-lang/book#4284) - Ch. 17: minor typos and link reference (rust-lang/book#4286) - Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282) - Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281) - Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165) - Ch 10.1 minor clarifications (rust-lang/book#4256) - Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232) - Ferris: always show, even when it’s small (rust-lang/book#4280) - Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279) - Persist printing error, NOT ErrorKind (rust-lang/book#4259) - Typo: "2" should be "2 seconds" (rust-lang/book#4263) - Ch. 17: fix tiny example consistency issue (rust-lang/book#4270) - Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261) - Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273) - 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272) - Ch. 10: Make social media discussion generic. (rust-lang/book#4249) - Another Ch. 17 -> 18 fix (rust-lang/book#4247) - Ch. 05: further tweak to wording about `user1` availability (rust-lang/book#4246) - Ch. 02: Fix rand version mistake (from testing) (rust-lang/book#4245) - Ch. 19: Correct the discussion of `fn` type and closures (rust-lang/book#4244) - Edition maintenance: scripting the updates for future work (rust-lang/book#4243) - Ch. 17: fresh-eyes edits (rust-lang/book#4242) - Ch. 17: drop lifetime not required in 2024 Edition (rust-lang/book#4212) - Appendix B, Operators: Replace “member access” with “field access” and “method call”. (rust-lang/book#4240) - Update to Rust 1.85 and 2024 Edition! (rust-lang/book#4241) - Chapter 1: fix 'four things' now that spacing is not emphasized (rust-lang/book#4239) - Fix typos in chapter 17 (rust-lang/book#4238) - NoStarch backports (rust-lang/book#4224) - Fix example for `cargo fix` (rust-lang/book#4226) - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) - chore: reformat src with dprint (rust-lang/book#4211) - Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209) - Document that `use` is also for `precise capturing` (rust-lang/book#4210) - Ch. 17: NoStarch Edits! (rust-lang/book#4206) ## rust-lang/nomicon 1 commits in 23fc2682f8fcb887f77d0eaabba708809f834c11..60f0b30d8ec1c9eb5c2582f2ec55f1094b0f8c42 2025-10-20 13:05:39 UTC to 2025-10-20 13:05:39 UTC - Fix typo in exception-safety.md (BinaryHeap::sift_up, user-defined and unsafe code separated) (rust-lang/nomicon#504) ## rust-lang/reference 11 commits in 8efb9805686722dba511b7b27281bb6b77d32130..752eab01cebdd6a2d90b53087298844c251859a1 2025-10-16 04:31:58 UTC to 2025-10-06 22:38:53 UTC - Clarify struct pattern binding shorthand (rust-lang/reference#2054) - Follow edition formatting for keywords (rust-lang/reference#2050) - generalise paragraph (rust-lang/reference#2047) - Rework the definitions of the extern ABIs (rust-lang/reference#2003) - Fix grammar of `ConstParam` (rust-lang/reference#2036) - Add a note to patterns.ident.precedent (rust-lang/reference#2022) - Add a description of how the reference is published (rust-lang/reference#2028) - Rearrange the README a little (rust-lang/reference#2029) - Consistently use sentence case (rust-lang/reference#2030) - More clearly define the default abi of an extern block (rust-lang/reference#2001) - fix(css): Correctly specify grammar-literal-bg (rust-lang/reference#2032)
No description provided.