-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
explicit_reinitialization: Cutoff reinit #11687
Conversation
r? @Alexendoo (rustbot has picked a reviewer for you, use r? to override) |
87b6a32
to
d860d45
Compare
9852f2e
to
3061a9b
Compare
Algorithm summary:
Tips
|
I'm not sure about this, it can change the behaviour of code with regards to drop order for example let mut x = some_vec();
x = some_other_vec(); // x is dropped here
// ... let x = some_vec();
let x = some_other_vec(); // x is no longer dropped here, but at the end of the scope
// ... For a I also don't think we should be suggesting to shadow one |
☔ The latest upstream changes (presumably #11460) made this pull request unmergeable. Please resolve the merge conflicts. |
a748b06
to
bebd568
Compare
Fixes: rust-lang#11671
just because less lines
bebd568
to
22fc4cf
Compare
Q&A
|
☔ The latest upstream changes (presumably #11791) made this pull request unmergeable. Please resolve the merge conflicts. |
Hey, this is a ping from triage, since there hasn't been any activity in some time. Are you still planning to continue this implementation? I'm guessing this PR stalled in part due to the usage of MIR. I currently use MIR for a different project and am not sure if it's the right choice for Clippy. As you say there is no one-to-one relation between MIR and HIR stuff which makes linting hard. There is also the problem that most of the Clippy team are not too familiar with MIR. If you're planning to continue this, I would suggest adding the @rustbot author |
@rustbot label +I-nominate |
As this lint is close to the |
changelog: [
explicit_reinitialization
]: new lint: introduce fresh variable instead of reinitialization