FakeReads create inconsistent results with equivalent examples involving partial moves #137677
Labels
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
The following code doesn't compile:
The error message makes sense:
The closure uses
x
, so it's not valid if you've partially moved out ofx
. Well then, in that case, doing the partial move after the closure has already been constructed should probably invalidate it. However, this compiles:Now, I don't think this is necessarily an inconsistency that must be eliminated. It's a pretty niche issue. However, we must have a reasonable explanation for why this happens and documentation from which this behavior could be predicted.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: