]> git.proxmox.com Git - rustc.git/blame - src/test/ui/did_you_mean/issue-35937.stderr
New upstream version 1.19.0+dfsg1
[rustc.git] / src / test / ui / did_you_mean / issue-35937.stderr
CommitLineData
7cac9316 1error[E0596]: cannot borrow immutable field `f.v` as mutable
cc61c64b
XL
2 --> $DIR/issue-35937.rs:17:5
3 |
416 | let f = Foo { v: Vec::new() };
5 | - consider changing this to `mut f`
617 | f.v.push("cat".to_string());
7 | ^^^ cannot mutably borrow immutable field
8
7cac9316 9error[E0594]: cannot assign to immutable field `s.x`
cc61c64b
XL
10 --> $DIR/issue-35937.rs:26:5
11 |
1225 | let s = S { x: 42 };
13 | - consider changing this to `mut s`
1426 | s.x += 1;
15 | ^^^^^^^^ cannot mutably borrow immutable field
16
7cac9316 17error[E0594]: cannot assign to immutable field `s.x`
cc61c64b
XL
18 --> $DIR/issue-35937.rs:30:5
19 |
2029 | fn bar(s: S) {
21 | - consider changing this to `mut s`
2230 | s.x += 1;
23 | ^^^^^^^^ cannot mutably borrow immutable field
24
7cac9316 25error: aborting due to previous error(s)
cc61c64b 26