summary refs log tree commit diff
path: root/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr
blob: 31563fbaa1c98533a48175354f542f8021ce9d00 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
error[E0596]: cannot borrow field of immutable binding as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:57:24
   |
LL |     let __isize = &mut x.y; //~ ERROR cannot borrow
   |                        ^^^ cannot mutably borrow field of immutable binding

error[E0596]: cannot borrow field of immutable binding as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:61:24
   |
LL |     let __isize = &mut x.y; //~ ERROR cannot borrow
   |                        ^^^ cannot mutably borrow field of immutable binding

error[E0596]: cannot borrow field of immutable binding as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:69:10
   |
LL |     &mut x.y //~ ERROR cannot borrow
   |          ^^^ cannot mutably borrow field of immutable binding

error[E0596]: cannot borrow field of immutable binding as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:73:10
   |
LL |     &mut x.y //~ ERROR cannot borrow
   |          ^^^ cannot mutably borrow field of immutable binding

error[E0594]: cannot assign to field of immutable binding
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:77:5
   |
LL |     x.y = 3; //~ ERROR cannot assign
   |     ^^^^^^^ cannot mutably borrow field of immutable binding

error[E0594]: cannot assign to field of immutable binding
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:81:5
   |
LL |     x.y = 3; //~ ERROR cannot assign
   |     ^^^^^^^ cannot mutably borrow field of immutable binding

error[E0594]: cannot assign to field of immutable binding
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:85:5
   |
LL |     x.y = 3; //~ ERROR cannot assign
   |     ^^^^^^^ cannot mutably borrow field of immutable binding

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:93:5
   |
LL |     x.set(0, 0); //~ ERROR cannot borrow
   |     ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:97:5
   |
LL |     x.set(0, 0); //~ ERROR cannot borrow
   |     ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:105:5
   |
LL |     x.y_mut() //~ ERROR cannot borrow
   |     ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:109:5
   |
LL |     x.y_mut() //~ ERROR cannot borrow
   |     ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:113:6
   |
LL |     *x.y_mut() = 3; //~ ERROR cannot borrow
   |      ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:117:6
   |
LL |     *x.y_mut() = 3; //~ ERROR cannot borrow
   |      ^ cannot borrow as mutable

error[E0596]: cannot borrow immutable borrowed content as mutable
  --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:121:6
   |
LL |     *x.y_mut() = 3; //~ ERROR cannot borrow
   |      ^ cannot borrow as mutable

error: aborting due to 14 previous errors

Some errors occurred: E0594, E0596.
For more information about an error, try `rustc --explain E0594`.