Rust trying to move a struct with Copy

I tried to come up with a minimal example on rust playground here:

I’m getting the error “cannot move out of borrowed context” in reference to the line

let _e: Edit<'a, T> = self.edit;

but Edit has #[derive(Copy, Clone)] so shouldn’t it be trying to copy instead of move?

What does Edits definition look like?

I’ll just copy the code:

#[derive(Copy, Clone)]
pub enum Edit<'a, T: 'a + Eq> {
    Foo(&'a T),

struct GridEntry<'a, T: 'a + Eq> {
    edit: Edit<'a, T>

impl<'a, T: 'a + Eq> GridEntry<'a, T> {
    fn f(&self) {
        let _e: Edit<'a, T> = self.edit;

fn main() {

The derived implementation looks like

impl<'a, T: 'a + Eq + Clone> Clone for Edit<'a, T> { ... }

The deriving machinery doesn’t know that the T: Clone bound isn’t actually necessary. You’ll probably want to manually implement Copy and Clone to avoid the extra bound.

Ah thanks! I actually don’t even want the thing pointed to the reference to be cloned so it looks like I would have had to make my own Clone implementation anyway.

There are several github issues around this. One of them is: