]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/borrowck-object-mutability.stderr
New upstream version 1.25.0+dfsg1
[rustc.git] / src / test / ui / span / borrowck-object-mutability.stderr
CommitLineData
7cac9316 1error[E0596]: cannot borrow immutable borrowed content `*x` as mutable
476ff2be
SL
2 --> $DIR/borrowck-object-mutability.rs:19:5
3 |
417 | fn borrowed_receiver(x: &Foo) {
5 | ---- use `&mut Foo` here to make mutable
618 | x.borrowed();
719 | x.borrowed_mut(); //~ ERROR cannot borrow
32a655c1 8 | ^ cannot borrow as mutable
476ff2be 9
7cac9316 10error[E0596]: cannot borrow immutable `Box` content `*x` as mutable
476ff2be
SL
11 --> $DIR/borrowck-object-mutability.rs:29:5
12 |
cc61c64b
XL
1327 | fn owned_receiver(x: Box<Foo>) {
14 | - consider changing this to `mut x`
1528 | x.borrowed();
476ff2be 1629 | x.borrowed_mut(); //~ ERROR cannot borrow
32a655c1 17 | ^ cannot borrow as mutable
476ff2be 18
041b39d2 19error: aborting due to 2 previous errors
476ff2be 20