error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:26:9 | LL | let ref a @ b = U; | -----^^^- | | | | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:28:9 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | value moved into `e` here | | value moved into `c` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:28:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^----- | | | | | value moved into `c` here | value borrowed, by `b`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:28:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^- | | | | | value moved into `e` here | value borrowed, by `d`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:32:9 | LL | let ref mut a @ [b, mut c] = [U, U]; | ---------^^^^-^^-----^ | | | | | | | value moved into `c` here | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:35:9 | LL | let ref a @ b = u(); | -----^^^- | | | | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:38:9 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | value moved into `e` here | | value moved into `c` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:38:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^----- | | | | | value moved into `c` here | value borrowed, by `b`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:38:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^- | | | | | value moved into `e` here | value borrowed, by `d`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:44:9 | LL | let ref mut a @ [b, mut c] = [u(), u()]; | ---------^^^^-^^-----^ | | | | | | | value moved into `c` here | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:49:9 | LL | ref a @ Some(b) => {} | -----^^^^^^^^-^ | | | | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:54:9 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^ | | | | | | | value moved into `e` here | | value moved into `c` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:54:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^----- | | | | | value moved into `c` here | value borrowed, by `b`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:54:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^- | | | | | value moved into `e` here | value borrowed, by `d`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:61:9 | LL | ref mut a @ Some([b, mut c]) => {} | ---------^^^^^^^^^-^^-----^^ | | | | | | | value moved into `c` here | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:67:9 | LL | ref a @ Some(b) => {} | -----^^^^^^^^-^ | | | | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:73:9 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^ | | | | | | | value moved into `e` here | | value moved into `c` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:73:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^----- | | | | | value moved into `c` here | value borrowed, by `b`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:73:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^- | | | | | value moved into `e` here | value borrowed, by `d`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:82:9 | LL | ref mut a @ Some([b, mut c]) => {} | ---------^^^^^^^^^-^^-----^^ | | | | | | | value moved into `c` here | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:13:11 | LL | fn f1(ref a @ b: U) {} | -----^^^- | | | | | value moved into `b` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:11 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | value moved into `e` here | | value moved into `c` here | value borrowed, by `a`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:20 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^----- | | | | | value moved into `c` here | value borrowed, by `b`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:35 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^- | | | | | value moved into `e` here | value borrowed, by `d`, here error: cannot move out of value because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:22:11 | LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {} | ---------^^^^-^^-----^ | | | | | | | value moved into `c` here | | value moved into `b` here | value borrowed, by `a`, here error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:32:9 | LL | let ref mut a @ [b, mut c] = [U, U]; | ^^^^^^^^^^^^^^^^-----^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:35:9 | LL | let ref a @ b = u(); | ^^^^^^^^- --- move occurs because value has type `U`, which does not implement the `Copy` trait | | | | | value moved here | value borrowed here after move error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:38:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | ^^^^^^^^----- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:38:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | ^^^^^^^^- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:44:9 | LL | let ref mut a @ [b, mut c] = [u(), u()]; | ^^^^^^^^^^^^^^^^-----^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:61:9 | LL | ref mut a @ Some([b, mut c]) => {} | ^^^^^^^^^^^^^^^^^^^^^-----^^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | ref mut a @ Some([b, ref mut c]) => {} | ^^^ error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:67:9 | LL | ref a @ Some(b) => {} | ^^^^^^^^^^^^^-^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | ref a @ Some(ref b) => {} | ^^^ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:73:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | ^^^^^^^^----- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | ref a @ Some((ref b @ ref mut c, ref d @ e)) => {} | ^^^ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:73:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | ^^^^^^^^- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | ref a @ Some((ref b @ mut c, ref d @ ref e)) => {} | ^^^ error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:82:9 | LL | ref mut a @ Some([b, mut c]) => {} | ^^^^^^^^^^^^^^^^^^^^^-----^^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | ref mut a @ Some([b, ref mut c]) => {} | ^^^ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:13:11 | LL | fn f1(ref a @ b: U) {} | ^^^^^^^^- | | | | | value moved here | value borrowed here after move | move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:16:20 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | ^^^^^^^^----- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:16:35 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | ^^^^^^^^- | | | | | value moved here | value borrowed here after move | = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value --> $DIR/borrowck-pat-by-move-and-ref.rs:22:11 | LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {} | ^^^^^^^^^^^^^^^^-----^ | | | | | value partially moved here | value borrowed here after partial move | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait error: aborting due to 39 previous errors For more information about this error, try `rustc --explain E0382`.