-
Notifications
You must be signed in to change notification settings - Fork 13.3k
RWARC should explicitly 'impl... Clone` #8052
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
Comments
It should derive clone, I think. |
Even better! |
Deriving Clone means losing the docstring. Maybe not a big deal for |
Oh, good point, thank you. Yes, they should probably keep the docstrings, even if just to point the reader at the docstring for Arc. |
RWArc had a clone() method, but it was part of impl RWArc instead of an implementation of Clone. Stick with the explicit implementation instead of deriving Clone so we can have a docstring. Fixes rust-lang#8052.
Because the `if .. {}` statement already puts the condition in expression scope, contained blocks would be parsed as complete statements, so any `&` binary expression whose left operand ended in a block would lead to a non-compiling suggestion. This adds a visitor to identify such expressions and add parentheses. This fixes rust-lang#8052.
…r=camsteffen Parenthesize blocks in `needless_bool` suggestion Because the `if .. {}` statement already puts the condition in expression scope, contained blocks would be parsed as complete statements, so any `&` binary expression whose left operand ended in a block would lead to a non-compiling suggestion. We identify such expressions and add parentheses. Note that we don't make a difference between normal and unsafe blocks because the parsing problems are the same for both. This fixes rust-lang#8052. --- changelog: none
Presently RWARC implements a
clone
function, but the two wordsClone for
are missing, resulting in compiler error when calling clone.The text was updated successfully, but these errors were encountered: