]> git.proxmox.com Git - rustc.git/blame - src/test/ui/did_you_mean/issue-35937.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / did_you_mean / issue-35937.stderr
CommitLineData
48663c56 1error[E0596]: cannot borrow `f.v` as mutable, as `f` is not declared as mutable
0731742a 2 --> $DIR/issue-35937.rs:7:5
cc61c64b 3 |
0531ce1d 4LL | let f = Foo { v: Vec::new() };
48663c56 5 | - help: consider changing this to be mutable: `mut f`
532ac7d7 6LL | f.v.push("cat".to_string());
c295e0f8 7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
cc61c64b 8
48663c56 9error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable
0731742a 10 --> $DIR/issue-35937.rs:16:5
cc61c64b 11 |
0531ce1d 12LL | let s = S { x: 42 };
48663c56 13 | - help: consider changing this to be mutable: `mut s`
532ac7d7 14LL | s.x += 1;
48663c56 15 | ^^^^^^^^ cannot assign
cc61c64b 16
48663c56 17error[E0594]: cannot assign to `s.x`, as `s` is not declared as mutable
0731742a 18 --> $DIR/issue-35937.rs:20:5
cc61c64b 19 |
0531ce1d 20LL | fn bar(s: S) {
48663c56 21 | - help: consider changing this to be mutable: `mut s`
532ac7d7 22LL | s.x += 1;
48663c56 23 | ^^^^^^^^ cannot assign
cc61c64b 24
041b39d2 25error: aborting due to 3 previous errors
cc61c64b 26
60c5eb7d
XL
27Some errors have detailed explanations: E0594, E0596.
28For more information about an error, try `rustc --explain E0594`.