1. struct S {
    2. a: String,
    3. }
    4. fn main() {
    5. let mut s1 = S {
    6. a: String::from("aaa"),
    7. };
    8. let mut s2 = S {
    9. a: String::from("bbb"),
    10. };
    11. let a = (&mut s1, &mut s2);
    12. let b = a.1; // the second element of a has been moved, thus only the first element left
    13. let d = a.0; // this is ok;
    14. let c = a; //compile failed
    15. }
    16. error[E0382]: use of moved value: `a`
    17. --> src/main.rs:15:13
    18. |
    19. 14 | let b = a.1;
    20. | --- value moved here
    21. 15 | let c = a;
    22. | ^ value used here after partial move
    23. |
    24. = note: move occurs because `a.1` has type `&mut S`, which does not implement the `Copy` trait