9 impl Add<isize> for Point {
12 fn add(self, z: isize) -> isize {
18 pub fn times(&self, z: isize) -> isize {
24 let mut p = Point {x: 3, y: 4};
26 // ok (we can loan out rcvr)
32 let mut p = Point {x: 3, y: 4};
34 // Here I create an outstanding loan and check that we get conflicts:
38 p + 3; //~ ERROR cannot use `p`
39 p.times(3); //~ ERROR cannot borrow `p`
41 *q + 3; // OK to use the new alias `q`
42 q.x += 1; // and OK to mutate it