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

Possible closure not being Clone anymore #28

Closed
@arora-aman

Description

@arora-aman

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

Metadata

Metadata

Assignees

Labels

edge-casesThings we should remember when documentingmigrations

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions