1
Fork 0

Change wording of note

This commit is contained in:
Aaron Hill 2021-01-08 14:57:28 -05:00
parent de90afc72e
commit 20979aad77
No known key found for this signature in database
GPG key ID: B4087E510E98B164
14 changed files with 20 additions and 20 deletions

View file

@ -218,7 +218,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
if self.fn_self_span_reported.insert(self_arg.span) { if self.fn_self_span_reported.insert(self_arg.span) {
err.span_note( err.span_note(
self_arg.span, self_arg.span,
&format!("this function consumes the receiver `self` by taking ownership of it, which moves {}", place_name) &format!("this function takes ownership of the receiver `self`, which moves {}", place_name)
); );
} }
} }

View file

@ -9,7 +9,7 @@ LL | {
LL | println!("{:?}", some_vec); LL | println!("{:?}", some_vec);
| ^^^^^^^^ value borrowed here after move | ^^^^^^^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `some_vec` note: this function takes ownership of the receiver `self`, which moves `some_vec`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -13,7 +13,7 @@ LL | };
LL | x.zero() LL | x.zero()
| ^ value used here after move | ^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `x` note: this function takes ownership of the receiver `self`, which moves `x`
--> $DIR/issue-34721.rs:4:13 --> $DIR/issue-34721.rs:4:13
| |
LL | fn zero(self) -> Self; LL | fn zero(self) -> Self;

View file

@ -12,7 +12,7 @@ LL | for l in bad_letters {
LL | bad_letters.push('s'); LL | bad_letters.push('s');
| ^^^^^^^^^^^ value borrowed here after move | ^^^^^^^^^^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `bad_letters` note: this function takes ownership of the receiver `self`, which moves `bad_letters`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -13,7 +13,7 @@ LL | let _closure = || orig;
| | | |
| value used here after move | value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `orig` note: this function takes ownership of the receiver `self`, which moves `orig`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -6,7 +6,7 @@ LL | val.0.into_iter().next();
LL | val.0; LL | val.0;
| ^^^^^ value used here after move | ^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `val.0` note: this function takes ownership of the receiver `self`, which moves `val.0`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;
@ -23,7 +23,7 @@ LL | foo.use_self();
LL | foo; LL | foo;
| ^^^ value used here after move | ^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `foo` note: this function takes ownership of the receiver `self`, which moves `foo`
--> $DIR/move-fn-self-receiver.rs:13:17 --> $DIR/move-fn-self-receiver.rs:13:17
| |
LL | fn use_self(self) {} LL | fn use_self(self) {}
@ -49,7 +49,7 @@ LL | boxed_foo.use_box_self();
LL | boxed_foo; LL | boxed_foo;
| ^^^^^^^^^ value used here after move | ^^^^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `boxed_foo` note: this function takes ownership of the receiver `self`, which moves `boxed_foo`
--> $DIR/move-fn-self-receiver.rs:14:21 --> $DIR/move-fn-self-receiver.rs:14:21
| |
LL | fn use_box_self(self: Box<Self>) {} LL | fn use_box_self(self: Box<Self>) {}
@ -65,7 +65,7 @@ LL | pin_box_foo.use_pin_box_self();
LL | pin_box_foo; LL | pin_box_foo;
| ^^^^^^^^^^^ value used here after move | ^^^^^^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `pin_box_foo` note: this function takes ownership of the receiver `self`, which moves `pin_box_foo`
--> $DIR/move-fn-self-receiver.rs:15:25 --> $DIR/move-fn-self-receiver.rs:15:25
| |
LL | fn use_pin_box_self(self: Pin<Box<Self>>) {} LL | fn use_pin_box_self(self: Pin<Box<Self>>) {}
@ -91,7 +91,7 @@ LL | rc_foo.use_rc_self();
LL | rc_foo; LL | rc_foo;
| ^^^^^^ value used here after move | ^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `rc_foo` note: this function takes ownership of the receiver `self`, which moves `rc_foo`
--> $DIR/move-fn-self-receiver.rs:16:20 --> $DIR/move-fn-self-receiver.rs:16:20
| |
LL | fn use_rc_self(self: Rc<Self>) {} LL | fn use_rc_self(self: Rc<Self>) {}
@ -146,7 +146,7 @@ LL | for _val in container.custom_into_iter() {}
LL | container; LL | container;
| ^^^^^^^^^ value used here after move | ^^^^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `container` note: this function takes ownership of the receiver `self`, which moves `container`
--> $DIR/move-fn-self-receiver.rs:23:25 --> $DIR/move-fn-self-receiver.rs:23:25
| |
LL | fn custom_into_iter(self) -> impl Iterator<Item = bool> { LL | fn custom_into_iter(self) -> impl Iterator<Item = bool> {

View file

@ -8,7 +8,7 @@ LL | consume(x.into_iter().next().unwrap());
LL | touch(&x[0]); LL | touch(&x[0]);
| ^ value borrowed here after move | ^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `x` note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -108,7 +108,7 @@ LL | let _y = x.into_iter().next().unwrap();
LL | touch(&x); LL | touch(&x);
| ^^ value borrowed here after move | ^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `x` note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;
@ -124,7 +124,7 @@ LL | let _y = [x.into_iter().next().unwrap(); 1];
LL | touch(&x); LL | touch(&x);
| ^^ value borrowed here after move | ^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `x` note: this function takes ownership of the receiver `self`, which moves `x`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -18,7 +18,7 @@ LL | for j in a {
| `a` moved due to this implicit call to `.into_iter()`, in previous iteration of loop | `a` moved due to this implicit call to `.into_iter()`, in previous iteration of loop
| help: consider borrowing to avoid moving into the for loop: `&a` | help: consider borrowing to avoid moving into the for loop: `&a`
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `a` note: this function takes ownership of the receiver `self`, which moves `a`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
| |
LL | fn into_iter(self) -> Self::IntoIter; LL | fn into_iter(self) -> Self::IntoIter;

View file

@ -51,7 +51,7 @@ LL | y.foo();
LL | println!("{}", &y); LL | println!("{}", &y);
| ^^ value borrowed here after move | ^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `y` note: this function takes ownership of the receiver `self`, which moves `y`
--> $DIR/borrow-after-move.rs:5:12 --> $DIR/borrow-after-move.rs:5:12
| |
LL | fn foo(self) -> String; LL | fn foo(self) -> String;

View file

@ -47,7 +47,7 @@ LL | y.foo();
LL | y.foo(); LL | y.foo();
| ^ value used here after move | ^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `y` note: this function takes ownership of the receiver `self`, which moves `y`
--> $DIR/double-move.rs:5:12 --> $DIR/double-move.rs:5:12
| |
LL | fn foo(self) -> String; LL | fn foo(self) -> String;

View file

@ -8,7 +8,7 @@ LL | self.bar();
LL | return self.x; LL | return self.x;
| ^^^^^^ value used here after move | ^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `self` note: this function takes ownership of the receiver `self`, which moves `self`
--> $DIR/use-after-move-self-based-on-type.rs:15:16 --> $DIR/use-after-move-self-based-on-type.rs:15:16
| |
LL | pub fn bar(self) {} LL | pub fn bar(self) {}

View file

@ -8,7 +8,7 @@ LL | self.bar();
LL | return *self.x; LL | return *self.x;
| ^^^^^^^ value used here after move | ^^^^^^^ value used here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `self` note: this function takes ownership of the receiver `self`, which moves `self`
--> $DIR/use-after-move-self.rs:13:16 --> $DIR/use-after-move-self.rs:13:16
| |
LL | pub fn bar(self) {} LL | pub fn bar(self) {}

View file

@ -8,7 +8,7 @@ LL | let end = Mine{other_val:1, ..start.make_string_bar()};
LL | println!("{}", start.test); LL | println!("{}", start.test);
| ^^^^^^^^^^ value borrowed here after move | ^^^^^^^^^^ value borrowed here after move
| |
note: this function consumes the receiver `self` by taking ownership of it, which moves `start` note: this function takes ownership of the receiver `self`, which moves `start`
--> $DIR/walk-struct-literal-with.rs:7:28 --> $DIR/walk-struct-literal-with.rs:7:28
| |
LL | fn make_string_bar(mut self) -> Mine{ LL | fn make_string_bar(mut self) -> Mine{