error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:25:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:24:9
|
LL | let ref mut a @ ref mut b = U;
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:29:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:28:9
|
LL | let ref mut a @ ref mut b = U;
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:32:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:31:9
|
LL | let ref mut a @ ref mut b = U;
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:35:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:34:9
|
LL | let ref mut a @ ref mut b = U;
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:39:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:38:9
|
LL | let ref mut a @ ref mut b = U;
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:43:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:42:9
|
LL | let ref mut a @ (
| ^--------
| |_____^
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:53:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:52:9
|
LL | let ref mut a @ (
| ^--------
| |_________^
error[E0007]: cannot bind by-move with sub-bindings
- --> $DIR/borrowck-pat-ref-mut-twice.rs:63:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:62:9
|
LL | let a @ (ref mut b, ref mut c) = (U, U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
- --> $DIR/borrowck-pat-ref-mut-twice.rs:67:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:66:9
|
LL | let a @ (b, [c, d]) = &mut val; // Same as ^--
| ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
- --> $DIR/borrowck-pat-ref-mut-twice.rs:71:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:70:9
|
LL | let a @ &mut ref mut b = &mut U;
| ^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error[E0007]: cannot bind by-move with sub-bindings
- --> $DIR/borrowck-pat-ref-mut-twice.rs:74:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:73:9
|
LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:79:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:78:9
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:79:37
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:78:37
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:85:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:84:9
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:85:37
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:84:37
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:92:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:91:9
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:92:37
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:91:37
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:104:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:103:9
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:104:37
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:103:37
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------^^^^^^^---------^
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:11:11
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:10:11
|
LL | fn f1(ref mut a @ ref mut b: U) {}
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:13:11
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:12:11
|
LL | fn f2(ref mut a @ ref mut b: U) {}
| ---------^^^---------
| first mutable borrow occurs here
error: cannot borrow `a` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:16:9
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:15:9
|
LL | ref mut a @ [
| ^--------
| |_________^
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:25:21
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:24:21
|
LL | let ref mut a @ ref mut b = U;
| ------------^^^^^^^^^
| - first borrow later used here
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:35:21
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:34:21
|
LL | let ref mut a @ ref mut b = U;
| ------------^^^^^^^^^
| ------ first borrow later used here
error[E0382]: borrow of moved value
- --> $DIR/borrowck-pat-ref-mut-twice.rs:63:25
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:62:25
|
LL | let a @ (ref mut b, ref mut c) = (U, U);
| ----------------^^^^^^^^^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
| value moved here
error[E0382]: borrow of moved value
- --> $DIR/borrowck-pat-ref-mut-twice.rs:67:21
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:66:21
|
LL | let a @ (b, [c, d]) = &mut val; // Same as ^--
| ------------^-- -------- move occurs because value has type `&mut (main::U, [main::U; 2])`, which does not implement the `Copy` trait
| value moved here
error[E0382]: borrow of moved value
- --> $DIR/borrowck-pat-ref-mut-twice.rs:71:18
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:70:18
|
LL | let a @ &mut ref mut b = &mut U;
| ---------^^^^^^^^^ ------ move occurs because value has type `&mut main::U`, which does not implement the `Copy` trait
| value moved here
error[E0382]: borrow of moved value
- --> $DIR/borrowck-pat-ref-mut-twice.rs:74:30
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:73:30
|
LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U);
| ---------------------^^^^^^^^^- ----------- move occurs because value has type `&mut (main::U, main::U)`, which does not implement the `Copy` trait
| value moved here
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:92:24
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:91:24
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------------^^^^^^^^^-
| ----------- first borrow later used here
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:92:53
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:91:53
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ----------------^^^^^^^^^-
| ----------- first borrow later used here
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:104:24
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:103:24
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ---------------^^^^^^^^^-
| - first borrow later used here
error[E0499]: cannot borrow `_` as mutable more than once at a time
- --> $DIR/borrowck-pat-ref-mut-twice.rs:104:53
+ --> $DIR/borrowck-pat-ref-mut-twice.rs:103:53
|
LL | ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
| ----------------^^^^^^^^^-