diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-08-29 08:48:36 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-08-29 08:48:36 +0000 |
| commit | 5b6f4b94c5679c9cce70d42cb4cbdbd55da2e0f7 (patch) | |
| tree | 6bbdc585b9c9d9d5a0352e49c2e009bf331bba60 | |
| parent | a6af6d6506e0420f2a62ce519db029c97f8cdd0b (diff) | |
| download | rust-5b6f4b94c5679c9cce70d42cb4cbdbd55da2e0f7.tar.gz rust-5b6f4b94c5679c9cce70d42cb4cbdbd55da2e0f7.zip | |
rebase: fix test output
| -rw-r--r-- | src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr | 17 | ||||
| -rw-r--r-- | src/test/ui/did_you_mean/issue-34126.stderr | 5 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr index aa7771a736c..e4c51bb77c9 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr @@ -11,8 +11,9 @@ LL | pub fn f(b: &mut i32) { | ^^^^^^^^ help: try removing `&mut` here | -LL | h(b); - | -- +LL - h(&mut b); +LL + h(b); + | error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable --> $DIR/mut-borrow-of-mut-ref.rs:11:12 @@ -27,8 +28,9 @@ LL | pub fn f(b: &mut i32) { | ^^^^^^^^ help: try removing `&mut` here | -LL | g(&mut b); - | -- +LL - g(&mut &mut b); +LL + g(&mut b); + | error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable --> $DIR/mut-borrow-of-mut-ref.rs:18:12 @@ -43,8 +45,9 @@ LL | pub fn g(b: &mut i32) { | ^^^^^^^^ help: try removing `&mut` here | -LL | h(&mut b); - | -- +LL - h(&mut &mut b); +LL + h(&mut b); + | error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable --> $DIR/mut-borrow-of-mut-ref.rs:35:5 @@ -55,7 +58,7 @@ LL | f.bar(); help: consider making the binding mutable | LL | pub fn baz(mut f: &mut String) { - | ^^^ + | +++ error: aborting due to 4 previous errors diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 86bc27106a9..666172197ce 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -11,8 +11,9 @@ LL | fn start(&mut self) { | ^^^^^^^^^ help: try removing `&mut` here | -LL | self.run(self); - | -- +LL - self.run(&mut self); +LL + self.run(self); + | error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable --> $DIR/issue-34126.rs:6:18 |
