Closed
Description
I don't think Query
being Copy
is sound?
IIUC you can go from a mutable Query
to a read-only QueryLens
, make a Query
out of that lens again, then copy that Query
, transmute_lens
it again, and get a Query
from it for a last time. Then you'd have a read-only query that is no longer bound to the &mut self
of the original mutable Query
.
Did I overlook something?
Originally posted by @Victoronz in #15858 (review)