Skip to content

Commit 20979aa

Browse files
committed
Change wording of note
1 parent de90afc commit 20979aa

14 files changed

+20
-20
lines changed

compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
218218
if self.fn_self_span_reported.insert(self_arg.span) {
219219
err.span_note(
220220
self_arg.span,
221-
&format!("this function consumes the receiver `self` by taking ownership of it, which moves {}", place_name)
221+
&format!("this function takes ownership of the receiver `self`, which moves {}", place_name)
222222
);
223223
}
224224
}

src/test/ui/codemap_tests/tab_3.stderr

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

src/test/ui/issues/issue-34721.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | };
1313
LL | x.zero()
1414
| ^ value used here after move
1515
|
16-
note: this function consumes the receiver `self` by taking ownership of it, which moves `x`
16+
note: this function takes ownership of the receiver `self`, which moves `x`
1717
--> $DIR/issue-34721.rs:4:13
1818
|
1919
LL | fn zero(self) -> Self;

src/test/ui/issues/issue-61108.stderr

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

src/test/ui/issues/issue-64559.stderr

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

src/test/ui/moves/move-fn-self-receiver.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | val.0.into_iter().next();
66
LL | val.0;
77
| ^^^^^ value used here after move
88
|
9-
note: this function consumes the receiver `self` by taking ownership of it, which moves `val.0`
9+
note: this function takes ownership of the receiver `self`, which moves `val.0`
1010
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
1111
|
1212
LL | fn into_iter(self) -> Self::IntoIter;
@@ -23,7 +23,7 @@ LL | foo.use_self();
2323
LL | foo;
2424
| ^^^ value used here after move
2525
|
26-
note: this function consumes the receiver `self` by taking ownership of it, which moves `foo`
26+
note: this function takes ownership of the receiver `self`, which moves `foo`
2727
--> $DIR/move-fn-self-receiver.rs:13:17
2828
|
2929
LL | fn use_self(self) {}
@@ -49,7 +49,7 @@ LL | boxed_foo.use_box_self();
4949
LL | boxed_foo;
5050
| ^^^^^^^^^ value used here after move
5151
|
52-
note: this function consumes the receiver `self` by taking ownership of it, which moves `boxed_foo`
52+
note: this function takes ownership of the receiver `self`, which moves `boxed_foo`
5353
--> $DIR/move-fn-self-receiver.rs:14:21
5454
|
5555
LL | fn use_box_self(self: Box<Self>) {}
@@ -65,7 +65,7 @@ LL | pin_box_foo.use_pin_box_self();
6565
LL | pin_box_foo;
6666
| ^^^^^^^^^^^ value used here after move
6767
|
68-
note: this function consumes the receiver `self` by taking ownership of it, which moves `pin_box_foo`
68+
note: this function takes ownership of the receiver `self`, which moves `pin_box_foo`
6969
--> $DIR/move-fn-self-receiver.rs:15:25
7070
|
7171
LL | fn use_pin_box_self(self: Pin<Box<Self>>) {}
@@ -91,7 +91,7 @@ LL | rc_foo.use_rc_self();
9191
LL | rc_foo;
9292
| ^^^^^^ value used here after move
9393
|
94-
note: this function consumes the receiver `self` by taking ownership of it, which moves `rc_foo`
94+
note: this function takes ownership of the receiver `self`, which moves `rc_foo`
9595
--> $DIR/move-fn-self-receiver.rs:16:20
9696
|
9797
LL | fn use_rc_self(self: Rc<Self>) {}
@@ -146,7 +146,7 @@ LL | for _val in container.custom_into_iter() {}
146146
LL | container;
147147
| ^^^^^^^^^ value used here after move
148148
|
149-
note: this function consumes the receiver `self` by taking ownership of it, which moves `container`
149+
note: this function takes ownership of the receiver `self`, which moves `container`
150150
--> $DIR/move-fn-self-receiver.rs:23:25
151151
|
152152
LL | fn custom_into_iter(self) -> impl Iterator<Item = bool> {

src/test/ui/moves/moves-based-on-type-access-to-field.stderr

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

src/test/ui/moves/moves-based-on-type-exprs.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ LL | let _y = x.into_iter().next().unwrap();
108108
LL | touch(&x);
109109
| ^^ value borrowed here after move
110110
|
111-
note: this function consumes the receiver `self` by taking ownership of it, which moves `x`
111+
note: this function takes ownership of the receiver `self`, which moves `x`
112112
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
113113
|
114114
LL | fn into_iter(self) -> Self::IntoIter;
@@ -124,7 +124,7 @@ LL | let _y = [x.into_iter().next().unwrap(); 1];
124124
LL | touch(&x);
125125
| ^^ value borrowed here after move
126126
|
127-
note: this function consumes the receiver `self` by taking ownership of it, which moves `x`
127+
note: this function takes ownership of the receiver `self`, which moves `x`
128128
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
129129
|
130130
LL | fn into_iter(self) -> Self::IntoIter;

src/test/ui/suggestions/borrow-for-loop-head.stderr

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

src/test/ui/unsized-locals/borrow-after-move.stderr

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

src/test/ui/unsized-locals/double-move.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ LL | y.foo();
4747
LL | y.foo();
4848
| ^ value used here after move
4949
|
50-
note: this function consumes the receiver `self` by taking ownership of it, which moves `y`
50+
note: this function takes ownership of the receiver `self`, which moves `y`
5151
--> $DIR/double-move.rs:5:12
5252
|
5353
LL | fn foo(self) -> String;

src/test/ui/use/use-after-move-self-based-on-type.stderr

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

src/test/ui/use/use-after-move-self.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | self.bar();
88
LL | return *self.x;
99
| ^^^^^^^ value used here after move
1010
|
11-
note: this function consumes the receiver `self` by taking ownership of it, which moves `self`
11+
note: this function takes ownership of the receiver `self`, which moves `self`
1212
--> $DIR/use-after-move-self.rs:13:16
1313
|
1414
LL | pub fn bar(self) {}

src/test/ui/walk-struct-literal-with.stderr

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

0 commit comments

Comments
 (0)