summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves/move-fn-self-receiver.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/moves/move-fn-self-receiver.stderr (renamed from src/test/ui/moves/move-fn-self-receiver.stderr)30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/test/ui/moves/move-fn-self-receiver.stderr b/tests/ui/moves/move-fn-self-receiver.stderr
index c13dc5882..7f69e5dcf 100644
--- a/src/test/ui/moves/move-fn-self-receiver.stderr
+++ b/tests/ui/moves/move-fn-self-receiver.stderr
@@ -6,12 +6,13 @@ LL | val.0.into_iter().next();
LL | val.0;
| ^^^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `val.0`
+note: `into_iter` takes ownership of the receiver `self`, which moves `val.0`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
- |
-LL | fn into_iter(self) -> Self::IntoIter;
- | ^^^^
= note: move occurs because `val.0` has type `Vec<bool>`, which does not implement the `Copy` trait
+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
@@ -23,7 +24,7 @@ LL | foo.use_self();
LL | foo;
| ^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `foo`
+note: `Foo::use_self` takes ownership of the receiver `self`, which moves `foo`
--> $DIR/move-fn-self-receiver.rs:13:17
|
LL | fn use_self(self) {}
@@ -49,7 +50,7 @@ LL | boxed_foo.use_box_self();
LL | boxed_foo;
| ^^^^^^^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `boxed_foo`
+note: `Foo::use_box_self` takes ownership of the receiver `self`, which moves `boxed_foo`
--> $DIR/move-fn-self-receiver.rs:14:21
|
LL | fn use_box_self(self: Box<Self>) {}
@@ -65,7 +66,7 @@ LL | pin_box_foo.use_pin_box_self();
LL | pin_box_foo;
| ^^^^^^^^^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `pin_box_foo`
+note: `Foo::use_pin_box_self` takes ownership of the receiver `self`, which moves `pin_box_foo`
--> $DIR/move-fn-self-receiver.rs:15:25
|
LL | fn use_pin_box_self(self: Pin<Box<Self>>) {}
@@ -91,15 +92,15 @@ LL | rc_foo.use_rc_self();
LL | rc_foo;
| ^^^^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `rc_foo`
+note: `Foo::use_rc_self` takes ownership of the receiver `self`, which moves `rc_foo`
--> $DIR/move-fn-self-receiver.rs:16:20
|
LL | fn use_rc_self(self: Rc<Self>) {}
| ^^^^
-help: consider cloning the value if the performance cost is acceptable
+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
@@ -113,9 +114,6 @@ LL | foo_add;
|
note: calling this operator moves the left-hand side
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
- |
-LL | fn add(self, rhs: Rhs) -> Self::Output;
- | ^^^^
error[E0382]: use of moved value: `implicit_into_iter`
--> $DIR/move-fn-self-receiver.rs:63:5
@@ -142,10 +140,10 @@ LL | for _val in explicit_into_iter.into_iter() {}
LL | explicit_into_iter;
| ^^^^^^^^^^^^^^^^^^ value used here after move
|
-help: consider cloning the value if the performance cost is acceptable
+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
@@ -157,7 +155,7 @@ LL | for _val in container.custom_into_iter() {}
LL | container;
| ^^^^^^^^^ value used here after move
|
-note: this function takes ownership of the receiver `self`, which moves `container`
+note: `Container::custom_into_iter` takes ownership of the receiver `self`, which moves `container`
--> $DIR/move-fn-self-receiver.rs:23:25
|
LL | fn custom_into_iter(self) -> impl Iterator<Item = bool> {