blob: 38cb7fe551841ac72dfe22b5ba4a6ca96f33c770 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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)]
LL | struct NotClone;
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
|