Compiler flag: force move to explicitly specify variables

Question: Is there a compiler flag, where instead of writing

move | ... | { ... }

the compiler forces the user to write:

move (... list of vars to move ...) | ... | { ... }


XY Problem: I'm trying to debug a GUI bug where I expect a certain Rc<T> to drop to 0 (and trigger a Drop). Instead, it refuses to happen on certain GUI events.

One possible source of this annoying bug is that there is some closure that is moving a Rc<T> (where I'm expecting it to be dropped).

Thus: is there some compiler flag where for each move, I have to explicitly specify which variables are being moved?

No, but you can explicitly drop(var) for the ones you don't want moved.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.