1 error[E0596]: cannot borrow field `f.v` of immutable binding as mutable
2 --> $DIR/issue-35937.rs:17:5
4 LL | let f = Foo { v: Vec::new() };
5 | - consider changing this to `mut f`
6 LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow
7 | ^^^ cannot mutably borrow field of immutable binding
9 error[E0594]: cannot assign to field `s.x` of immutable binding
10 --> $DIR/issue-35937.rs:26:5
12 LL | let s = S { x: 42 };
13 | - consider changing this to `mut s`
14 LL | s.x += 1; //~ ERROR cannot assign
15 | ^^^^^^^^ cannot mutably borrow field of immutable binding
17 error[E0594]: cannot assign to field `s.x` of immutable binding
18 --> $DIR/issue-35937.rs:30:5
21 | - consider changing this to `mut s`
22 LL | s.x += 1; //~ ERROR cannot assign
23 | ^^^^^^^^ cannot mutably borrow field of immutable binding
25 error: aborting due to 3 previous errors
27 Some errors occurred: E0594, E0596.
28 For more information about an error, try `rustc --explain E0594`.