Skip to content

Commit e6e7a6d

Browse files
committed
Fix wording
1 parent d687d46 commit e6e7a6d

16 files changed

+20
-20
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
403403
let mut span: MultiSpan = arg.span.into();
404404
span.push_span_label(
405405
arg.span,
406-
"this type parameter takes ownership of the value".to_string(),
406+
"this parameter takes ownership of the value".to_string(),
407407
);
408408
let descr = match node.fn_kind() {
409409
Some(hir::intravisit::FnKind::ItemFn(..)) | None => "function",

src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ note: consider changing this parameter type in function `consume` to borrow inst
1212
--> $DIR/borrowck-consume-unsize-vec.rs:3:15
1313
|
1414
LL | fn consume(_: Box<[i32]>) {
15-
| ------- ^^^^^^^^^^ this type parameter takes ownership of the value
15+
| ------- ^^^^^^^^^^ this parameter takes ownership of the value
1616
| |
1717
| in this function
1818
help: consider cloning the value if the performance cost is acceptable

src/test/ui/borrowck/borrowck-consume-upcast-box.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ note: consider changing this parameter type in function `consume` to borrow inst
1212
--> $DIR/borrowck-consume-upcast-box.rs:5:15
1313
|
1414
LL | fn consume(_: Box<dyn Foo>) {
15-
| ------- ^^^^^^^^^^^^ this type parameter takes ownership of the value
15+
| ------- ^^^^^^^^^^^^ this parameter takes ownership of the value
1616
| |
1717
| in this function
1818

src/test/ui/borrowck/mut-borrow-in-loop-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ note: consider changing this parameter type in function `handle` to borrow inste
1212
--> $DIR/mut-borrow-in-loop-2.rs:9:22
1313
|
1414
LL | fn handle(value: T) -> Self;
15-
| ------ ^ this type parameter takes ownership of the value
15+
| ------ ^ this parameter takes ownership of the value
1616
| |
1717
| in this function
1818
help: consider creating a fresh reborrow of `value` here

src/test/ui/liveness/liveness-move-call-arg.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead
1313
--> $DIR/liveness-move-call-arg.rs:1:13
1414
|
1515
LL | fn take(_x: Box<isize>) {}
16-
| ---- ^^^^^^^^^^ this type parameter takes ownership of the value
16+
| ---- ^^^^^^^^^^ this parameter takes ownership of the value
1717
| |
1818
| in this function
1919
help: consider cloning the value if the performance cost is acceptable

src/test/ui/liveness/liveness-use-after-send.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ note: consider changing this parameter type in function `send` to borrow instead
1212
--> $DIR/liveness-use-after-send.rs:3:54
1313
|
1414
LL | fn send<T:Send + std::fmt::Debug>(ch: Chan<T>, data: T) {
15-
| ---- in this function ^ this type parameter takes ownership of the value
15+
| ---- in this function ^ this parameter takes ownership of the value
1616
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
1717
help: consider cloning the value if the performance cost is acceptable
1818
|

src/test/ui/moves/borrow-closures-instead-of-move.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow
1212
--> $DIR/borrow-closures-instead-of-move.rs:34:20
1313
|
1414
LL | fn takes_fnonce(_: impl FnOnce()) {}
15-
| ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value
15+
| ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value
1616
| |
1717
| in this function
1818
help: consider borrowing `f`
@@ -36,7 +36,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow
3636
--> $DIR/borrow-closures-instead-of-move.rs:34:20
3737
|
3838
LL | fn takes_fnonce(_: impl FnOnce()) {}
39-
| ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value
39+
| ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value
4040
| |
4141
| in this function
4242
help: consider mutably borrowing `m`
@@ -62,7 +62,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow
6262
--> $DIR/borrow-closures-instead-of-move.rs:34:20
6363
|
6464
LL | fn takes_fnonce(_: impl FnOnce()) {}
65-
| ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value
65+
| ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value
6666
| |
6767
| in this function
6868
help: consider mutably borrowing `closure`

src/test/ui/moves/move-guard-same-consts.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead
1313
--> $DIR/move-guard-same-consts.rs:25:15
1414
|
1515
LL | fn take<T>(_: T) -> bool { false }
16-
| ---- ^ this type parameter takes ownership of the value
16+
| ---- ^ this parameter takes ownership of the value
1717
| |
1818
| in this function
1919
help: consider cloning the value if the performance cost is acceptable

src/test/ui/moves/move-in-guard-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead
1313
--> $DIR/move-in-guard-1.rs:15:15
1414
|
1515
LL | fn take<T>(_: T) -> bool { false }
16-
| ---- ^ this type parameter takes ownership of the value
16+
| ---- ^ this parameter takes ownership of the value
1717
| |
1818
| in this function
1919
help: consider cloning the value if the performance cost is acceptable

src/test/ui/moves/move-in-guard-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ note: consider changing this parameter type in function `take` to borrow instead
1111
--> $DIR/move-in-guard-2.rs:13:15
1212
|
1313
LL | fn take<T>(_: T) -> bool { false }
14-
| ---- ^ this type parameter takes ownership of the value
14+
| ---- ^ this parameter takes ownership of the value
1515
| |
1616
| in this function
1717
help: consider cloning the value if the performance cost is acceptable

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ note: consider changing this parameter type in function `guard` to borrow instea
112112
--> $DIR/moves-based-on-type-exprs.rs:6:14
113113
|
114114
LL | fn guard(_s: String) -> bool {panic!()}
115-
| ----- ^^^^^^ this type parameter takes ownership of the value
115+
| ----- ^^^^^^ this parameter takes ownership of the value
116116
| |
117117
| in this function
118118
help: consider cloning the value if the performance cost is acceptable

src/test/ui/union/union-move.mirunsafeck.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins
1313
--> $DIR/union-move.rs:10:19
1414
|
1515
LL | fn move_out<T>(x: T) {}
16-
| -------- ^ this type parameter takes ownership of the value
16+
| -------- ^ this parameter takes ownership of the value
1717
| |
1818
| in this function
1919

@@ -32,7 +32,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins
3232
--> $DIR/union-move.rs:10:19
3333
|
3434
LL | fn move_out<T>(x: T) {}
35-
| -------- ^ this type parameter takes ownership of the value
35+
| -------- ^ this parameter takes ownership of the value
3636
| |
3737
| in this function
3838

src/test/ui/union/union-move.thirunsafeck.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins
1313
--> $DIR/union-move.rs:10:19
1414
|
1515
LL | fn move_out<T>(x: T) {}
16-
| -------- ^ this type parameter takes ownership of the value
16+
| -------- ^ this parameter takes ownership of the value
1717
| |
1818
| in this function
1919

@@ -32,7 +32,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins
3232
--> $DIR/union-move.rs:10:19
3333
|
3434
LL | fn move_out<T>(x: T) {}
35-
| -------- ^ this type parameter takes ownership of the value
35+
| -------- ^ this parameter takes ownership of the value
3636
| |
3737
| in this function
3838

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ note: consider changing this parameter type in function `drop_unsized` to borrow
3333
--> $DIR/borrow-after-move.rs:14:31
3434
|
3535
LL | fn drop_unsized<T: ?Sized>(_: T) {}
36-
| ------------ ^ this type parameter takes ownership of the value
36+
| ------------ ^ this parameter takes ownership of the value
3737
| |
3838
| in this function
3939

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ note: consider changing this parameter type in function `drop_unsized` to borrow
2121
--> $DIR/double-move.rs:14:31
2222
|
2323
LL | fn drop_unsized<T: ?Sized>(_: T) {}
24-
| ------------ ^ this type parameter takes ownership of the value
24+
| ------------ ^ this parameter takes ownership of the value
2525
| |
2626
| in this function
2727

src/test/ui/use/use-after-move-implicity-coerced-object.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ note: consider changing this parameter type in method `push` to borrow instead i
1414
--> $DIR/use-after-move-implicity-coerced-object.rs:17:27
1515
|
1616
LL | fn push(&mut self, n: Box<dyn ToString + 'static>) {
17-
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type parameter takes ownership of the value
17+
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
1818
| |
1919
| in this method
2020

0 commit comments

Comments
 (0)