Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Possible closure not being Clone anymore #28

Closed
arora-aman opened this issue Nov 19, 2020 · 0 comments · Fixed by sexxi-goose/rust#52 or rust-lang/rust#84730
Closed

Possible closure not being Clone anymore #28

arora-aman opened this issue Nov 19, 2020 · 0 comments · Fixed by sexxi-goose/rust#52 or rust-lang/rust#84730
Assignees
Labels
edge-cases Things we should remember when documenting migrations

Comments

@arora-aman
Copy link
Member

Will RFC#2229 technically be a breaking change because of that? It seems possible, if uncommon, for a move closure to currently be Clone because it captured the whole instance, but that capturing subfields could capture things that are not themselves Clone, and thus make the closure no longer Clone. (Maybe one of the fields cannot be safely copied, but the captured things wraps it up into something that can always do so soundly.)

(That can't be a problem with Copy, since all subfields have to be Copy anyway. So it'll just make more closures Copy than used to be.)

https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Capture-disjoint-fields.20and.20Clone/near/216698416

@arora-aman arora-aman changed the title Clone weirdness Possible closure not being Clone anymore Nov 19, 2020
@arora-aman arora-aman added the edge-cases Things we should remember when documenting label Nov 19, 2020
@arora-aman arora-aman added migrations edge-cases Things we should remember when documenting and removed edge-cases Things we should remember when documenting labels Dec 4, 2020
@roxelo roxelo self-assigned this Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
edge-cases Things we should remember when documenting migrations
Projects
None yet
3 participants