summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/moves')
-rw-r--r--tests/ui/moves/move-fn-self-receiver.stderr8
-rw-r--r--tests/ui/moves/moves-based-on-type-access-to-field.stderr2
-rw-r--r--tests/ui/moves/moves-based-on-type-exprs.stderr4
-rw-r--r--tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr2
-rw-r--r--tests/ui/moves/pin-mut-reborrow.stderr2
-rw-r--r--tests/ui/moves/suggest-clone.stderr7
-rw-r--r--tests/ui/moves/use_of_moved_value_clone_suggestions.stderr2
7 files changed, 13 insertions, 14 deletions
diff --git a/tests/ui/moves/move-fn-self-receiver.stderr b/tests/ui/moves/move-fn-self-receiver.stderr
index 91d237b1d..c91a8b5ef 100644
--- a/tests/ui/moves/move-fn-self-receiver.stderr
+++ b/tests/ui/moves/move-fn-self-receiver.stderr
@@ -12,7 +12,7 @@ note: `into_iter` takes ownership of the receiver `self`, which moves `val.0`
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | val.0.clone().into_iter().next();
- | ++++++++
+ | ++++++++
error[E0382]: use of moved value: `foo`
--> $DIR/move-fn-self-receiver.rs:34:5
@@ -78,7 +78,7 @@ error[E0505]: cannot move out of `mut_foo` because it is borrowed
LL | let mut mut_foo = Foo;
| ----------- binding `mut_foo` declared here
LL | let ret = mut_foo.use_mut_self();
- | ---------------------- borrow of `mut_foo` occurs here
+ | ------- borrow of `mut_foo` occurs here
LL | mut_foo;
| ^^^^^^^ move out of `mut_foo` occurs here
LL | ret;
@@ -102,7 +102,7 @@ LL | fn use_rc_self(self: Rc<Self>) {}
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | rc_foo.clone().use_rc_self();
- | ++++++++
+ | ++++++++
error[E0382]: use of moved value: `foo_add`
--> $DIR/move-fn-self-receiver.rs:59:5
@@ -145,7 +145,7 @@ LL | explicit_into_iter;
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | for _val in explicit_into_iter.clone().into_iter() {}
- | ++++++++
+ | ++++++++
error[E0382]: use of moved value: `container`
--> $DIR/move-fn-self-receiver.rs:71:5
diff --git a/tests/ui/moves/moves-based-on-type-access-to-field.stderr b/tests/ui/moves/moves-based-on-type-access-to-field.stderr
index a28f324aa..739018663 100644
--- a/tests/ui/moves/moves-based-on-type-access-to-field.stderr
+++ b/tests/ui/moves/moves-based-on-type-access-to-field.stderr
@@ -13,7 +13,7 @@ note: `into_iter` takes ownership of the receiver `self`, which moves `x`
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | consume(x.clone().into_iter().next().unwrap());
- | ++++++++
+ | ++++++++
error: aborting due to previous error
diff --git a/tests/ui/moves/moves-based-on-type-exprs.stderr b/tests/ui/moves/moves-based-on-type-exprs.stderr
index ab7c27456..45f7d4063 100644
--- a/tests/ui/moves/moves-based-on-type-exprs.stderr
+++ b/tests/ui/moves/moves-based-on-type-exprs.stderr
@@ -165,7 +165,7 @@ note: `into_iter` takes ownership of the receiver `self`, which moves `x`
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | let _y = x.clone().into_iter().next().unwrap();
- | ++++++++
+ | ++++++++
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:83:11
@@ -182,7 +182,7 @@ note: `into_iter` takes ownership of the receiver `self`, which moves `x`
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | let _y = [x.clone().into_iter().next().unwrap(); 1];
- | ++++++++
+ | ++++++++
error: aborting due to 11 previous errors
diff --git a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
index 7e513b73c..a184482a4 100644
--- a/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
+++ b/tests/ui/moves/pin-mut-reborrow-infer-var-issue-107419.stderr
@@ -13,7 +13,7 @@ note: `Pin::<&'a mut T>::get_mut` takes ownership of the receiver `self`, which
help: consider reborrowing the `Pin` instead of moving it
|
LL | foo(r.as_mut().get_mut());
- | +++++++++
+ | +++++++++
error: aborting due to previous error
diff --git a/tests/ui/moves/pin-mut-reborrow.stderr b/tests/ui/moves/pin-mut-reborrow.stderr
index 16fa4bacc..4bf207e7e 100644
--- a/tests/ui/moves/pin-mut-reborrow.stderr
+++ b/tests/ui/moves/pin-mut-reborrow.stderr
@@ -16,7 +16,7 @@ LL | fn foo(self: Pin<&mut Self>) {}
help: consider reborrowing the `Pin` instead of moving it
|
LL | foo.as_mut().foo();
- | +++++++++
+ | +++++++++
error: aborting due to previous error
diff --git a/tests/ui/moves/suggest-clone.stderr b/tests/ui/moves/suggest-clone.stderr
index cbb3dfea3..065acf904 100644
--- a/tests/ui/moves/suggest-clone.stderr
+++ b/tests/ui/moves/suggest-clone.stderr
@@ -2,9 +2,8 @@ error[E0507]: cannot move out of `*foo` which is behind a shared reference
--> $DIR/suggest-clone.rs:10:5
|
LL | foo.foo();
- | ^^^^-----
- | | |
- | | `*foo` moved due to this method call
+ | ^^^ ----- `*foo` moved due to this method call
+ | |
| move occurs because `*foo` has type `Foo`, which does not implement the `Copy` trait
|
note: `Foo::foo` takes ownership of the receiver `self`, which moves `*foo`
@@ -15,7 +14,7 @@ LL | fn foo(self) {}
help: you can `clone` the value and consume it, but this might not be your desired behavior
|
LL | foo.clone().foo();
- | ++++++++
+ | ++++++++
error: aborting due to previous error
diff --git a/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr b/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
index 22e7951db..0bb486a88 100644
--- a/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
+++ b/tests/ui/moves/use_of_moved_value_clone_suggestions.stderr
@@ -8,7 +8,7 @@ LL | (t, t)
| |
| value moved here
|
-help: consider cloning the value if the performance cost is acceptable
+help: clone the value to increment its reference count
|
LL | (t.clone(), t)
| ++++++++