1 error[E0596]: cannot borrow immutable item `f.v` as mutable
2 --> $DIR/issue-35937.rs:17:5
4 LL | let f = Foo { v: Vec::new() };
5 | - help: consider changing this to be mutable: `mut f`
6 LL | f.v.push("cat".to_string()); //~ ERROR cannot borrow
7 | ^^^ cannot borrow as mutable
9 error[E0384]: cannot assign twice to immutable variable `s`
10 --> $DIR/issue-35937.rs:26:5
12 LL | let s = S { x: 42 };
15 | first assignment to `s`
16 | consider changing this to `mut s`
17 LL | s.x += 1; //~ ERROR cannot assign
18 | ^^^^^^^^ cannot assign twice to immutable variable
20 error[E0384]: cannot assign to immutable argument `s`
21 --> $DIR/issue-35937.rs:30:5
24 | - consider changing this to `mut s`
25 LL | s.x += 1; //~ ERROR cannot assign
26 | ^^^^^^^^ cannot assign to immutable argument
28 error: aborting due to 3 previous errors
30 Some errors occurred: E0384, E0596.
31 For more information about an error, try `rustc --explain E0384`.