summary refs log tree commit diff
path: root/src/test/ui/nll/get_default.stderr
blob: ed2c305090ccc0075317b033d4dd0161e91f764b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
  --> $DIR/get_default.rs:33:17
   |
28 |         match map.get() {
   |               --- immutable borrow occurs here
...
33 |                 map.set(String::new()); // Just AST errors here
   |                 ^^^ mutable borrow occurs here
...
38 | }
   | - immutable borrow ends here

error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
  --> $DIR/get_default.rs:44:17
   |
42 |         match map.get() {
   |               --- immutable borrow occurs here
43 |             Some(v) => {
44 |                 map.set(String::new()); // Both AST and MIR error here
   |                 ^^^ mutable borrow occurs here
...
55 | }
   | - immutable borrow ends here

error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Ast)
  --> $DIR/get_default.rs:50:17
   |
42 |         match map.get() {
   |               --- immutable borrow occurs here
...
50 |                 map.set(String::new()); // Just AST errors here
   |                 ^^^ mutable borrow occurs here
...
55 | }
   | - immutable borrow ends here

error[E0502]: cannot borrow `*map` as mutable because it is also borrowed as immutable (Mir)
  --> $DIR/get_default.rs:44:17
   |
42 |         match map.get() {
   |               --- immutable borrow occurs here
43 |             Some(v) => {
44 |                 map.set(String::new()); // Both AST and MIR error here
   |                 ^^^ mutable borrow occurs here
...
47 |                 return v;
   |                        - borrow later used here

error: aborting due to 4 previous errors