Skip to content

Commit 5b6f4b9

Browse files
committed
rebase: fix test output
1 parent a6af6d6 commit 5b6f4b9

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ LL | pub fn f(b: &mut i32) {
1111
| ^^^^^^^^
1212
help: try removing `&mut` here
1313
|
14-
LL | h(b);
15-
| --
14+
LL - h(&mut b);
15+
LL + h(b);
16+
|
1617

1718
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
1819
--> $DIR/mut-borrow-of-mut-ref.rs:11:12
@@ -27,8 +28,9 @@ LL | pub fn f(b: &mut i32) {
2728
| ^^^^^^^^
2829
help: try removing `&mut` here
2930
|
30-
LL | g(&mut b);
31-
| --
31+
LL - g(&mut &mut b);
32+
LL + g(&mut b);
33+
|
3234

3335
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
3436
--> $DIR/mut-borrow-of-mut-ref.rs:18:12
@@ -43,8 +45,9 @@ LL | pub fn g(b: &mut i32) {
4345
| ^^^^^^^^
4446
help: try removing `&mut` here
4547
|
46-
LL | h(&mut b);
47-
| --
48+
LL - h(&mut &mut b);
49+
LL + h(&mut b);
50+
|
4851

4952
error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
5053
--> $DIR/mut-borrow-of-mut-ref.rs:35:5
@@ -55,7 +58,7 @@ LL | f.bar();
5558
help: consider making the binding mutable
5659
|
5760
LL | pub fn baz(mut f: &mut String) {
58-
| ^^^
61+
| +++
5962

6063
error: aborting due to 4 previous errors
6164

src/test/ui/did_you_mean/issue-34126.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ LL | fn start(&mut self) {
1111
| ^^^^^^^^^
1212
help: try removing `&mut` here
1313
|
14-
LL | self.run(self);
15-
| --
14+
LL - self.run(&mut self);
15+
LL + self.run(self);
16+
|
1617

1718
error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
1819
--> $DIR/issue-34126.rs:6:18

0 commit comments

Comments
 (0)