fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable 2 --> $DIR/issue-35937.rs:7:5 3 | 4LL | f.v.push("cat".to_string()); 5 | ^^^ cannot borrow as mutable 6 | 7help: consider changing this to be mutable 8 | 9LL | let mut f = Foo { v: Vec::new() }; 10 | +++ 11 12error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable 13 --> $DIR/issue-35937.rs:16:5 14 | 15LL | s.x += 1; 16 | ^^^^^^^^ cannot assign 17 | 18help: consider changing this to be mutable 19 | 20LL | let mut s = S { x: 42 }; 21 | +++ 22 23error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable 24 --> $DIR/issue-35937.rs:20:5 25 | 26LL | s.x += 1; 27 | ^^^^^^^^ cannot assign 28 | 29help: consider changing this to be mutable 30 | 31LL | fn bar(mut s: S) { 32 | +++ 33 34error: aborting due to 3 previous errors 35 36Some errors have detailed explanations: E0594, E0596. 37For more information about an error, try `rustc --explain E0594`.