Open
Conversation
roxelo
commented
Jul 5, 2021
Member
Author
roxelo
left a comment
There was a problem hiding this comment.
@arora-aman I think there are a few things we want to change. Mainly wording
src/types/closure.md
Outdated
|
|
||
| Regardless of if the data will be read by the closure, i.e. in case of wild card patterns, if a variable defined outside the closure is mentioned within the closure the variable will be captured in its entirety. | ||
|
|
||
| ## Other traits difference |
Member
Author
There was a problem hiding this comment.
I think we can actually delete this section. This is because the modified rules stated "the captured values" and we already clarified in the earlier Edition2018 subsection that the values captured are variables that are captured in its entirety
arora-aman
reviewed
Jul 6, 2021
src/types/closure.md
Outdated
| } | ||
| ### Capturing references in move contexts | ||
|
|
||
| Rust doesn't allow moving fields out references as a result in the case of move closures, when the closure takes ownership of a path, it will only take ownership of a prefix of path that runs up until the first dereference (this may be the entire path if there are no dereferences in the path). |
Member
There was a problem hiding this comment.
Instead of truncate ... we reborrow the data being accessed throw the reference
src/types/closure.md
Outdated
|
|
||
| Regardless of if the data will be read by the closure, i.e. in case of wild card patterns, if a variable defined outside the closure is mentioned within the closure the variable will be captured in its entirety. | ||
|
|
||
| ## Other traits difference |
37ce76c to
bc0e50c
Compare
880405c to
0a9323a
Compare
This should be the other form of its.
Remove incorrect apostrophe
Expand on Unicode identifiers.
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.
Fix typos + grammar
array-expr.md: fix typo; 'polish' sentence
example for bindings after at
…rcion Mention "function item type to `fn pointer`" coercion
92336ed to
6b88e48
Compare
Co-authored-by: Eric Huss <eric@huss.org>
Allow users to change status labels
expressions.md: Attempt fixing broken grammar in Mutability paragraph
Document RangeFrom patterns
Fixed link typo in Generics.md
There are definitions of subtrait and supertrait, so use the official terminology.
…rtrait-subtrait Use subtrait/supertrait, not sub-trait, super-trait.
6b88e48 to
702a71f
Compare
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @arora-aman