-
Notifications
You must be signed in to change notification settings - Fork 488
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
Fix typos + grammar #1037
Fix typos + grammar #1037
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.
Thanks, these a great fixes, very much appreciated!
src/destructors.md
Outdated
@@ -1,7 +1,7 @@ | |||
# Destructors | |||
|
|||
When an [initialized] [variable] or [temporary] goes out of | |||
[scope](#drop-scopes) its *destructor* is run, or it is *dropped*. [Assignment] | |||
[scope](#drop-scopes), its *destructor* is run (also phrased as: "it is *dropped*"). [Assignment] |
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'm not entirely certain this is what was meant by the the original. @matthewjasper can you clarify here?
My understanding is that "dropping" and "running destructors" have different definitions, and that not all values have destructors. I don't think the two terms can always be used interchangeably. That is:
- When any value goes out of scope, it is "dropped".
- If the value has a destructor, it is run.
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 didn't intend to change the meaning of this sentence. If "dropping" and "running destructors" have different meanings here, then my change was wrong. It would be better to revert it and add an explanation here about the difference between the terms.
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 went ahead and pushed a revert for this, and filed #1078 to follow up on this particular question.
The phrase 'may not' could mean 'might not' or 'is not allowed to'.
The original sentence could mean that "its destructor is run" and "it is dropped" are two separate possibilities, rather than two names for the same action.
It is not clear if the original intended to mean these as two separate concepts, or synonyms for the same thing.
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.
Thank you very much!
Update books ## nomicon 1 commits in 7a13537f96af4b9b8e3ea296d6e5c3c7ab72ce9f..f51734eb5566c826b471977747ea3d7d6915bbe9 2021-07-05 23:34:47 -0400 to 2021-07-23 18:24:35 +0900 - Add cloning example for dot operator behaviour (rust-lang/nomicon#292) ## reference 3 commits in 82d75cf423e4a7824fb36e73ccb18519d6900610..3b7be075af5d6e402a18efff672a8a265b4596fd 2021-07-15 06:49:08 -0700 to 2021-07-26 13:20:11 -0700 - Fix typos + grammar (rust-lang/reference#1037) - Expand on Unicode identifiers. (rust-lang/reference#1022) - Remove incorrect apostrophe (rust-lang/reference#1076) ## book 17 commits in eac55314210519238652f12b30fec9daea61f7fe..a07036f864b37896b31eb996cd7aedb489f69a1f 2021-07-19 11:08:01 -0400 to 2021-07-26 20:19:46 -0400 - Set expectations a bit more realistically - Snapshot of chapter 4 for nostarch - A few small wording tweaks in ch 4 - Clarify that it's not stack/heap exactly that matters for copy/non copy, fixes rust-lang/book#2799 - Clarify a detail around move. Fixes rust-lang/book#2413. - Clarify places that changed because of NLL. Fixes rust-lang/book#1939. - nostarch ch3 - Small edits to chapter 3 - (rust-lang/book#2797) - Update ch03-03-how-functions-work.md: Pervasive -> Prevalent. (rust-lang/book#2796) - Address loop labels and continue. Fixes rust-lang/book#1392. - Clarify behavior of integer division. Fixes rust-lang/book#2248. - Demonstrate how scope interacts with shadowing - Add another cross-reference to the new unit type introduction - Introduce the unit type with tuples. Fixes rust-lang/book#1933. - Reword sentence to not have numbers separated only by a comma - Link directly to other installation page. Fixes rust-lang/book#1609 ## rust-by-example 1 commits in 1db6bb483cc87ad3b424d9aba764fe622960a1be..0dc9cd4e89f00cb5230f120e1a083916386e422b 2021-07-15 06:17:42 -0300 to 2021-07-23 09:14:27 -0300 - Grammatical mistake: Comparison as ... as the (rust-lang/rust-by-example#1453) ## rustc-dev-guide 2 commits in 93422c21baca585dc88357ec886a48f6ddc7d665..09343d6f921d2a07c66f8c41ec3d65bf1fa52556 2021-07-13 12:45:58 -0400 to 2021-07-26 00:37:28 +0200 - Fix typo in building/bootstrapping.md (rust-lang/rustc-dev-guide#1175) - Link directly to stabilization report comments (rust-lang/rustc-dev-guide#1173) ## edition-guide 4 commits in af696ce8ea526445590ae0ca66a8128d2a95a69a..3710b0cae783d0bcd2b42452a63b081473f5970a 2021-07-20 11:38:03 -0400 to 2021-07-26 11:34:46 -0700 - Add more consistent headings and add a migration section to reserving-syntax (rust-lang/edition-guide#263) - reserving-syntax.md: Expand and add detail (rust-lang/edition-guide#249) - Fix typo in or-patterns section (rust-lang/edition-guide#262) - Fix typo (rust-lang/edition-guide#261)
Update books ## nomicon 1 commits in 7a13537f96af4b9b8e3ea296d6e5c3c7ab72ce9f..f51734eb5566c826b471977747ea3d7d6915bbe9 2021-07-05 23:34:47 -0400 to 2021-07-23 18:24:35 +0900 - Add cloning example for dot operator behaviour (rust-lang/nomicon#292) ## reference 3 commits in 82d75cf423e4a7824fb36e73ccb18519d6900610..3b7be075af5d6e402a18efff672a8a265b4596fd 2021-07-15 06:49:08 -0700 to 2021-07-26 13:20:11 -0700 - Fix typos + grammar (rust-lang/reference#1037) - Expand on Unicode identifiers. (rust-lang/reference#1022) - Remove incorrect apostrophe (rust-lang/reference#1076) ## book 17 commits in eac55314210519238652f12b30fec9daea61f7fe..a07036f864b37896b31eb996cd7aedb489f69a1f 2021-07-19 11:08:01 -0400 to 2021-07-26 20:19:46 -0400 - Set expectations a bit more realistically - Snapshot of chapter 4 for nostarch - A few small wording tweaks in ch 4 - Clarify that it's not stack/heap exactly that matters for copy/non copy, fixes rust-lang/book#2799 - Clarify a detail around move. Fixes rust-lang/book#2413. - Clarify places that changed because of NLL. Fixes rust-lang/book#1939. - nostarch ch3 - Small edits to chapter 3 - (rust-lang/book#2797) - Update ch03-03-how-functions-work.md: Pervasive -> Prevalent. (rust-lang/book#2796) - Address loop labels and continue. Fixes rust-lang/book#1392. - Clarify behavior of integer division. Fixes rust-lang/book#2248. - Demonstrate how scope interacts with shadowing - Add another cross-reference to the new unit type introduction - Introduce the unit type with tuples. Fixes rust-lang/book#1933. - Reword sentence to not have numbers separated only by a comma - Link directly to other installation page. Fixes rust-lang/book#1609 ## rust-by-example 1 commits in 1db6bb483cc87ad3b424d9aba764fe622960a1be..0dc9cd4e89f00cb5230f120e1a083916386e422b 2021-07-15 06:17:42 -0300 to 2021-07-23 09:14:27 -0300 - Grammatical mistake: Comparison as ... as the (rust-lang/rust-by-example#1453) ## rustc-dev-guide 2 commits in 93422c21baca585dc88357ec886a48f6ddc7d665..09343d6f921d2a07c66f8c41ec3d65bf1fa52556 2021-07-13 12:45:58 -0400 to 2021-07-26 00:37:28 +0200 - Fix typo in building/bootstrapping.md (rust-lang/rustc-dev-guide#1175) - Link directly to stabilization report comments (rust-lang/rustc-dev-guide#1173) ## edition-guide 4 commits in af696ce8ea526445590ae0ca66a8128d2a95a69a..3710b0cae783d0bcd2b42452a63b081473f5970a 2021-07-20 11:38:03 -0400 to 2021-07-26 11:34:46 -0700 - Add more consistent headings and add a migration section to reserving-syntax (rust-lang/edition-guide#263) - reserving-syntax.md: Expand and add detail (rust-lang/edition-guide#249) - Fix typo in or-patterns section (rust-lang/edition-guide#262) - Fix typo (rust-lang/edition-guide#261)
No description provided.