error[E0308]: mismatched types --> $DIR/explain_clone_autoref.rs:9:5 | LL | fn clone_thing(nc: &NotClone) -> NotClone { | -------- expected `NotClone` because of return type LL | LL | nc.clone() | ^^^^^^^^^^ expected `NotClone`, found `&NotClone` | note: `NotClone` does not implement `Clone`, so `&NotClone` was cloned instead --> $DIR/explain_clone_autoref.rs:9:5 | LL | nc.clone() | ^^ help: consider annotating `NotClone` with `#[derive(Clone)]` | LL | #[derive(Clone)] | error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.