-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove unnecessary into conversions #15042
Conversation
I noticed these while working on rust-lang/rust#129249. I am not confident that there's no platform specific shenanigans that make these
I am working on correctly handling that case (it shouldn't warn at all), but in the other two cases it does seem like the lint caught real cases of this. |
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 Esteban. Just want to confirm this doesn't really block rust-lang/rust#129249, right? I am collectin data for cargo-as-subtree in rust-lang/rust and wonder how painful it is not.
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 Esteban. Just want to confirm this doesn't really block rust-lang/rust#129249, right? I am collectin data for cargo-as-subtree in rust-lang/rust and wonder how painful it is not.
@weihanglo it doesn't block it, I worked around it on that PR for now (right now I only care about getting to the point of being able to run crater), but will become a nuisance at an indeterminate time in the future. I'm confident this can just ride the train without it becoming an issue for me (given my current speed on finishing that PR). Thanks for the concern! The PR in the end might not be landed (I'd push the new logic to clippy), or might be allow-by-default. Either way it wouldn't block progress for these to be present in our tooling. I just wanted to clean up some of the things I was seeing. |
"identity"
.into()
calls where the base's type isn't changed is a future compatibility foot-gun (like the issue we had withtime
a few months ago) as newimpl Into
blocks can cause previously compiling code to start failing. I don't foresee these ones in particular causing problems anytime soon, but I noticed them and might as well clean them up as a drive-by.