diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index e917d527eb3..5bbeaa631c6 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -403,7 +403,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { let mut span: MultiSpan = arg.span.into(); span.push_span_label( arg.span, - "this type parameter takes ownership of the value".to_string(), + "this parameter takes ownership of the value".to_string(), ); let descr = match node.fn_kind() { Some(hir::intravisit::FnKind::ItemFn(..)) | None => "function", diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr index cfaa8c08df8..c25337c0c6c 100644 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr +++ b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr @@ -12,7 +12,7 @@ note: consider changing this parameter type in function `consume` to borrow inst --> $DIR/borrowck-consume-unsize-vec.rs:3:15 | LL | fn consume(_: Box<[i32]>) { - | ------- ^^^^^^^^^^ this type parameter takes ownership of the value + | ------- ^^^^^^^^^^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr index c73d1df971a..49d85cd5fa2 100644 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr +++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr @@ -12,7 +12,7 @@ note: consider changing this parameter type in function `consume` to borrow inst --> $DIR/borrowck-consume-upcast-box.rs:5:15 | LL | fn consume(_: Box) { - | ------- ^^^^^^^^^^^^ this type parameter takes ownership of the value + | ------- ^^^^^^^^^^^^ this parameter takes ownership of the value | | | in this function diff --git a/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr b/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr index 4f287d3a735..b441244cdfd 100644 --- a/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr +++ b/src/test/ui/borrowck/mut-borrow-in-loop-2.stderr @@ -12,7 +12,7 @@ note: consider changing this parameter type in function `handle` to borrow inste --> $DIR/mut-borrow-in-loop-2.rs:9:22 | LL | fn handle(value: T) -> Self; - | ------ ^ this type parameter takes ownership of the value + | ------ ^ this parameter takes ownership of the value | | | in this function help: consider creating a fresh reborrow of `value` here diff --git a/src/test/ui/liveness/liveness-move-call-arg.stderr b/src/test/ui/liveness/liveness-move-call-arg.stderr index 4a869cdce4a..5b5ac65113f 100644 --- a/src/test/ui/liveness/liveness-move-call-arg.stderr +++ b/src/test/ui/liveness/liveness-move-call-arg.stderr @@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead --> $DIR/liveness-move-call-arg.rs:1:13 | LL | fn take(_x: Box) {} - | ---- ^^^^^^^^^^ this type parameter takes ownership of the value + | ---- ^^^^^^^^^^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/liveness/liveness-use-after-send.stderr b/src/test/ui/liveness/liveness-use-after-send.stderr index cf4aa8fc9c4..3dbe5ac517e 100644 --- a/src/test/ui/liveness/liveness-use-after-send.stderr +++ b/src/test/ui/liveness/liveness-use-after-send.stderr @@ -12,7 +12,7 @@ note: consider changing this parameter type in function `send` to borrow instead --> $DIR/liveness-use-after-send.rs:3:54 | LL | fn send(ch: Chan, data: T) { - | ---- in this function ^ this type parameter takes ownership of the value + | ---- in this function ^ this parameter takes ownership of the value = 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) help: consider cloning the value if the performance cost is acceptable | diff --git a/src/test/ui/moves/borrow-closures-instead-of-move.stderr b/src/test/ui/moves/borrow-closures-instead-of-move.stderr index d3f250e69b2..b6855222039 100644 --- a/src/test/ui/moves/borrow-closures-instead-of-move.stderr +++ b/src/test/ui/moves/borrow-closures-instead-of-move.stderr @@ -12,7 +12,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow --> $DIR/borrow-closures-instead-of-move.rs:34:20 | LL | fn takes_fnonce(_: impl FnOnce()) {} - | ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value + | ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value | | | in this function help: consider borrowing `f` @@ -36,7 +36,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow --> $DIR/borrow-closures-instead-of-move.rs:34:20 | LL | fn takes_fnonce(_: impl FnOnce()) {} - | ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value + | ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value | | | in this function help: consider mutably borrowing `m` @@ -62,7 +62,7 @@ note: consider changing this parameter type in function `takes_fnonce` to borrow --> $DIR/borrow-closures-instead-of-move.rs:34:20 | LL | fn takes_fnonce(_: impl FnOnce()) {} - | ------------ ^^^^^^^^^^^^^ this type parameter takes ownership of the value + | ------------ ^^^^^^^^^^^^^ this parameter takes ownership of the value | | | in this function help: consider mutably borrowing `closure` diff --git a/src/test/ui/moves/move-guard-same-consts.stderr b/src/test/ui/moves/move-guard-same-consts.stderr index 687e8497dc6..440a908a3c6 100644 --- a/src/test/ui/moves/move-guard-same-consts.stderr +++ b/src/test/ui/moves/move-guard-same-consts.stderr @@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead --> $DIR/move-guard-same-consts.rs:25:15 | LL | fn take(_: T) -> bool { false } - | ---- ^ this type parameter takes ownership of the value + | ---- ^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/moves/move-in-guard-1.stderr b/src/test/ui/moves/move-in-guard-1.stderr index a21dca7f16e..e054f31349a 100644 --- a/src/test/ui/moves/move-in-guard-1.stderr +++ b/src/test/ui/moves/move-in-guard-1.stderr @@ -13,7 +13,7 @@ note: consider changing this parameter type in function `take` to borrow instead --> $DIR/move-in-guard-1.rs:15:15 | LL | fn take(_: T) -> bool { false } - | ---- ^ this type parameter takes ownership of the value + | ---- ^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/moves/move-in-guard-2.stderr b/src/test/ui/moves/move-in-guard-2.stderr index 5277a812a44..49267c27631 100644 --- a/src/test/ui/moves/move-in-guard-2.stderr +++ b/src/test/ui/moves/move-in-guard-2.stderr @@ -11,7 +11,7 @@ note: consider changing this parameter type in function `take` to borrow instead --> $DIR/move-in-guard-2.rs:13:15 | LL | fn take(_: T) -> bool { false } - | ---- ^ this type parameter takes ownership of the value + | ---- ^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/moves/moves-based-on-type-exprs.stderr b/src/test/ui/moves/moves-based-on-type-exprs.stderr index 37fb40ffe78..6efda8c5e83 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.stderr +++ b/src/test/ui/moves/moves-based-on-type-exprs.stderr @@ -112,7 +112,7 @@ note: consider changing this parameter type in function `guard` to borrow instea --> $DIR/moves-based-on-type-exprs.rs:6:14 | LL | fn guard(_s: String) -> bool {panic!()} - | ----- ^^^^^^ this type parameter takes ownership of the value + | ----- ^^^^^^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable diff --git a/src/test/ui/union/union-move.mirunsafeck.stderr b/src/test/ui/union/union-move.mirunsafeck.stderr index 46b7be440e0..c695282fbb0 100644 --- a/src/test/ui/union/union-move.mirunsafeck.stderr +++ b/src/test/ui/union/union-move.mirunsafeck.stderr @@ -13,7 +13,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins --> $DIR/union-move.rs:10:19 | LL | fn move_out(x: T) {} - | -------- ^ this type parameter takes ownership of the value + | -------- ^ this parameter takes ownership of the value | | | in this function @@ -32,7 +32,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins --> $DIR/union-move.rs:10:19 | LL | fn move_out(x: T) {} - | -------- ^ this type parameter takes ownership of the value + | -------- ^ this parameter takes ownership of the value | | | in this function diff --git a/src/test/ui/union/union-move.thirunsafeck.stderr b/src/test/ui/union/union-move.thirunsafeck.stderr index 46b7be440e0..c695282fbb0 100644 --- a/src/test/ui/union/union-move.thirunsafeck.stderr +++ b/src/test/ui/union/union-move.thirunsafeck.stderr @@ -13,7 +13,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins --> $DIR/union-move.rs:10:19 | LL | fn move_out(x: T) {} - | -------- ^ this type parameter takes ownership of the value + | -------- ^ this parameter takes ownership of the value | | | in this function @@ -32,7 +32,7 @@ note: consider changing this parameter type in function `move_out` to borrow ins --> $DIR/union-move.rs:10:19 | LL | fn move_out(x: T) {} - | -------- ^ this type parameter takes ownership of the value + | -------- ^ this parameter takes ownership of the value | | | in this function diff --git a/src/test/ui/unsized-locals/borrow-after-move.stderr b/src/test/ui/unsized-locals/borrow-after-move.stderr index f63684407ec..e11c398e8d0 100644 --- a/src/test/ui/unsized-locals/borrow-after-move.stderr +++ b/src/test/ui/unsized-locals/borrow-after-move.stderr @@ -33,7 +33,7 @@ note: consider changing this parameter type in function `drop_unsized` to borrow --> $DIR/borrow-after-move.rs:14:31 | LL | fn drop_unsized(_: T) {} - | ------------ ^ this type parameter takes ownership of the value + | ------------ ^ this parameter takes ownership of the value | | | in this function diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr index b883067427f..84192e75098 100644 --- a/src/test/ui/unsized-locals/double-move.stderr +++ b/src/test/ui/unsized-locals/double-move.stderr @@ -21,7 +21,7 @@ note: consider changing this parameter type in function `drop_unsized` to borrow --> $DIR/double-move.rs:14:31 | LL | fn drop_unsized(_: T) {} - | ------------ ^ this type parameter takes ownership of the value + | ------------ ^ this parameter takes ownership of the value | | | in this function diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr index 7d94aa21682..395bb4019fd 100644 --- a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr +++ b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr @@ -14,7 +14,7 @@ note: consider changing this parameter type in method `push` to borrow instead i --> $DIR/use-after-move-implicity-coerced-object.rs:17:27 | LL | fn push(&mut self, n: Box) { - | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type parameter takes ownership of the value + | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value | | | in this method