Skip to content

Opt-in copy causes types that shouldn't be Copy to be copy #20126

Closed
@Aatch

Description

@Aatch

Basically, it's now possible to write:

struct Foo { a: int };

impl Drop for Foo { fn drop(&mut self) { } }

impl Copy for Foo { }

and have everything work. This unfortunately means that doing something like let a = b with a Foo will zero b, but not move it.

/cc @nikomatsakis @pcwalton

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions