Skip to content

Register new snapshots #9771

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

Closed
wants to merge 1 commit into from
Closed

Conversation

alexcrichton
Copy link
Member

Still building locally, we'll see if anything dies...

bors added a commit that referenced this pull request Oct 8, 2013
Still building locally, we'll see if anything dies...
@bors bors closed this Oct 8, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 1, 2022
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 1, 2022
Fix rust-lang#9771 (`unnecessary_to_owned` false positive)

Fixes rust-lang#9771

In that issue's example(s), the lint tried to add a `&` to a value, which implicitly changed the type of a field to a reference. The fix is to add the reference to `receiver_ty` (the type of the receiver of the `to_owned`-like method), before passing `receiver_ty` to `can_change_type`. `can_change_type` properly rejects the modified `receiver_ty`.

cc: `@mikerite` just because I think he was the author of `can_change_type`.

changelog: fix `unnecessary_to_owned` false positive which implicitly tried to change the type of a field to a reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants