Skip to content

Derived Clone implementation is sometimes not usable #40754

Closed
@dimbleby

Description

@dimbleby

At work we recently ran into a case that's essentially the same as #19034, in which #[deriving(Clone)] produces an implementation that's not usable when you'd hope - whereas the 'natural' implementation that any human would likely write is just fine.

So this is both less useful than it could be, and confusing. (It took us non-trivial time to discover #19034 and understand the problem).

#19034 was rejected on the grounds that it was "working as intended". I ask that this be revisited:

  • is it really intended to produce a hobbled impl?
  • even if yes, can't we have an issue requesting that this be improved?
  • if the derived impl is for some reason unimprovable, would it be possible to give better explanation in the error?

(Meta: I feel kinda bad opening an issue that I know full well has been rejected once already. Please feel free to re-educate me if I should have gone about this some other way!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions