2023-11-20 19:09:11 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/assignment-of-clone-call-on-ref-due-to-missing-bound.rs:18:39
|
|
|
|
|
|
|
|
|
LL | let mut x: HashSet<Day> = v.clone();
|
|
|
|
| ------------ ^^^^^^^^^ expected `HashSet<Day>`, found `&HashSet<Day>`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
2023-12-07 21:54:41 -06:00
|
|
|
= note: expected struct `HashSet<_>`
|
|
|
|
found reference `&HashSet<_>`
|
2023-11-20 19:09:11 -06:00
|
|
|
note: `HashSet<Day>` does not implement `Clone`, so `&HashSet<Day>` was cloned instead
|
|
|
|
--> $DIR/assignment-of-clone-call-on-ref-due-to-missing-bound.rs:18:39
|
|
|
|
|
|
|
|
|
LL | let mut x: HashSet<Day> = v.clone();
|
|
|
|
| ^
|
|
|
|
= help: `Clone` is not implemented because the trait bound `Day: Clone` is not satisfied
|
|
|
|
help: consider annotating `Day` with `#[derive(Clone)]`
|
|
|
|
|
|
|
|
|
LL + #[derive(Clone)]
|
|
|
|
LL | enum Day {
|
|
|
|
|
|
|
|
|
|
2023-12-04 16:00:34 -06:00
|
|
|
error: aborting due to 1 previous error
|
2023-11-20 19:09:11 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|