@@ -31,36 +31,44 @@ LL | if let Some(ref mut y @ ref mut z) = x && true {}
31
31
| value is mutably borrowed by `y` here
32
32
33
33
error: cannot borrow value as mutable more than once at a time
34
- --> $DIR/conflicting_bindings.rs:13:20
34
+ --> $DIR/conflicting_bindings.rs:13:43
35
+ |
36
+ LL | if let Some(_) = Some(()) && let Some(ref mut y @ ref mut z) = x && true {}
37
+ | ^^^^^^^^^ --------- value is mutably borrowed by `z` here
38
+ | |
39
+ | value is mutably borrowed by `y` here
40
+
41
+ error: cannot borrow value as mutable more than once at a time
42
+ --> $DIR/conflicting_bindings.rs:15:20
35
43
|
36
44
LL | while let Some(ref mut y @ ref mut z) = x {}
37
45
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
38
46
| |
39
47
| value is mutably borrowed by `y` here
40
48
41
49
error: cannot borrow value as mutable more than once at a time
42
- --> $DIR/conflicting_bindings.rs:15 :20
50
+ --> $DIR/conflicting_bindings.rs:17 :20
43
51
|
44
52
LL | while let Some(ref mut y @ ref mut z) = x && true {}
45
53
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
46
54
| |
47
55
| value is mutably borrowed by `y` here
48
56
49
57
error: cannot borrow value as mutable more than once at a time
50
- --> $DIR/conflicting_bindings.rs:18 :9
58
+ --> $DIR/conflicting_bindings.rs:20 :9
51
59
|
52
60
LL | ref mut y @ ref mut z => {}
53
61
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
54
62
| |
55
63
| value is mutably borrowed by `y` here
56
64
57
65
error: cannot borrow value as mutable more than once at a time
58
- --> $DIR/conflicting_bindings.rs:21 :24
66
+ --> $DIR/conflicting_bindings.rs:23 :24
59
67
|
60
68
LL | () if let Some(ref mut y @ ref mut z) = x => {}
61
69
| ^^^^^^^^^ --------- value is mutably borrowed by `z` here
62
70
| |
63
71
| value is mutably borrowed by `y` here
64
72
65
- error: aborting due to 8 previous errors
73
+ error: aborting due to 9 previous errors
66
74
0 commit comments