You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since drop flags come after all named fields and the last field in a DST struct is unsized, finding the drop flag is a bit tricky. Therefore, it is currently not checked. A possible fix is to find the alignment by taking the size of the struct from its vtable and subtracting the size of the drop flag. However, since the plan is to remove the drop flag anyway (#5016), I have just left a FIXME and issue a warning when we skip the check.
Activity
steveklabnik commentedon Feb 2, 2016
@nrc is this still relevant today?
nrc commentedon Feb 3, 2016
Yes, afaik. cc @pnkfelix
tailhook commentedon Mar 29, 2016
Does this mean if i get:
Then I will get a memory leak?
add missing spaces in rust-lang#16758 warning
Auto merge of #32676 - durka:patch-18, r=alexcrichton
pnkfelix commentedon Apr 28, 2016
some relevant recent discussion from
#rust-internalsIRC channel: https://botbot.me/mozilla/rust-internals/2016-04-28/?msg=65078367&page=3chriscoomber commentedon Aug 22, 2016
Just hit this when coercing a
Box<RwLock< (struct) >>to aBox<RwLock< (trait) >>.(Aside: it is of course illegal to coerce a
RwLock< (struct) >to aRwLock< (trait) >- I don't really understand why the outer box makes this legal.)Here's a small example that produces this warning:
Will I get a memory leak with this code?
jonas-schievink commentedon Aug 22, 2016
This should no longer be relevant after #35764 lands since it will remove in-struct drop flags
Osspial commentedon Nov 4, 2016
Should this warning be removed now? Non-zeroing drops have landed, so there isn't a flag to check.
arielb1 commentedon Nov 4, 2016
Sure enough. There is no such a thing as a drop flag in the MIR (1.13+) universe.
Auto merge of rust-lang#16758 - Veykril:cargo-lock, r=Veykril