]>
Commit | Line | Data |
---|---|---|
7cac9316 | 1 | error[E0596]: cannot borrow immutable borrowed content `*x` as mutable |
476ff2be SL |
2 | --> $DIR/borrowck-object-mutability.rs:19:5 |
3 | | | |
4 | 17 | fn borrowed_receiver(x: &Foo) { | |
5 | | ---- use `&mut Foo` here to make mutable | |
6 | 18 | x.borrowed(); | |
7 | 19 | x.borrowed_mut(); //~ ERROR cannot borrow | |
32a655c1 | 8 | | ^ cannot borrow as mutable |
476ff2be | 9 | |
7cac9316 | 10 | error[E0596]: cannot borrow immutable `Box` content `*x` as mutable |
476ff2be SL |
11 | --> $DIR/borrowck-object-mutability.rs:29:5 |
12 | | | |
cc61c64b XL |
13 | 27 | fn owned_receiver(x: Box<Foo>) { |
14 | | - consider changing this to `mut x` | |
15 | 28 | x.borrowed(); | |
476ff2be | 16 | 29 | x.borrowed_mut(); //~ ERROR cannot borrow |
32a655c1 | 17 | | ^ cannot borrow as mutable |
476ff2be | 18 | |
041b39d2 | 19 | error: aborting due to 2 previous errors |
476ff2be | 20 |