1 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
2 --> $DIR/borrow-raw-address-of-mutability.rs:5:13
4 LL | let y = &raw mut x;
5 | ^^^^^^^^^^ cannot borrow as mutable
7 help: consider changing this to be mutable
12 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
13 --> $DIR/borrow-raw-address-of-mutability.rs:11:17
16 | - help: consider changing this to be mutable: `mut x`
18 LL | let y = &raw mut x;
19 | ^^^^^^^^^^ cannot borrow as mutable
21 error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
22 --> $DIR/borrow-raw-address-of-mutability.rs:21:5
24 LL | let y = &raw mut x;
25 | - calling `f` requires mutable binding due to mutable borrow of `x`
28 | ^ cannot borrow as mutable
30 help: consider changing this to be mutable
35 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
36 --> $DIR/borrow-raw-address-of-mutability.rs:29:17
38 LL | fn make_fn<F: Fn()>(f: F) -> F { f }
39 | - change this to accept `FnMut` instead of `Fn`
41 LL | let f = make_fn(|| {
42 | ------- -- in this closure
44 | expects `Fn` instead of `FnMut`
45 LL | let y = &raw mut x;
46 | ^^^^^^^^^^ cannot borrow as mutable
48 error[E0596]: cannot borrow `x` as mutable, as it is a captured variable in a `Fn` closure
49 --> $DIR/borrow-raw-address-of-mutability.rs:37:17
51 LL | fn make_fn<F: Fn()>(f: F) -> F { f }
52 | - change this to accept `FnMut` instead of `Fn`
54 LL | let f = make_fn(move || {
55 | ------- ------- in this closure
57 | expects `Fn` instead of `FnMut`
58 LL | let y = &raw mut x;
59 | ^^^^^^^^^^ cannot borrow as mutable
61 error: aborting due to 5 previous errors
63 For more information about this error, try `rustc --explain E0596`.