-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Bogus "warning: dataflow bug??? moving out of type with dtor" for field assignments. #34101
Comments
cc me |
My current intuition is that the Update: Then again, maybe its simpler to leave |
Or maybe the right approach, which has the advantage of being isolated to |
(I have a patch for this, I'll put up a PR shortly.) |
…nor gather flags for untracked content. (Includes a regression test, which needed to go into `compile-fail/` due to weaknesses when combining `#[deny(warnings)]` with `tcx.sess.span_warn(..)`) (updated with review feedback from arielb1.)
Fix issue rust-lang#34101 Fix issue rust-lang#34101: do not track subcontent of type with dtor nor gather flags for untracked content. (Includes a regression test, which needed to go into `compile-fail/` due to weaknesses when combining `#[deny(warnings)]` with `tcx.sess.span_warn(..)`)
Fixed by PR #34109 |
When assigning a non-
Copy
field of a structure which has a destructor, the drop of the field before writing the new value causes a warning in the MIR dataflow code:Seeing how this is supported in stable Rust, the warning seems superfluous and the resulting code runs without a hitch, although I'm not sure if there any subtle problems around unwinding.
cc @arielb1 @pnkfelix
The text was updated successfully, but these errors were encountered: