1 error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable
2 --> $DIR/issue-35937.rs:7:5
4 LL | f.v.push("cat".to_string());
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
7 help: consider changing this to be mutable
9 LL | let mut f = Foo { v: Vec::new() };
12 error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable
13 --> $DIR/issue-35937.rs:16:5
16 | ^^^^^^^^ cannot assign
18 help: consider changing this to be mutable
20 LL | let mut s = S { x: 42 };
23 error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable
24 --> $DIR/issue-35937.rs:20:5
27 | ^^^^^^^^ cannot assign
29 help: consider changing this to be mutable
31 LL | fn bar(mut s: S) {
34 error: aborting due to 3 previous errors
36 Some errors have detailed explanations: E0594, E0596.
37 For more information about an error, try `rustc --explain E0594`.