Skip to content

Prevent regions from being closed over and hidden from view #2203

Closed
@nikomatsakis

Description

@nikomatsakis

Because a &T type is copyable, it is currently possible to close over them using an fn@() (and, eventually, iface@). This is clearly wrong. We need a new kind---perhaps heap or gc?---indicating data which is not only copyable but also copyable into a shared closure. This goes in between copy/send, I think.

Metadata

Metadata

Assignees

Labels

A-lifetimesArea: Lifetimes / regions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions