Fix wording

This commit is contained in:
Esteban Küber 2022-11-03 14:10:08 -07:00
parent d687d46f68
commit e6e7a6db28
16 changed files with 20 additions and 20 deletions

View File

@ -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",

View File

@ -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

View File

@ -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<dyn Foo>) {
| ------- ^^^^^^^^^^^^ this type parameter takes ownership of the value
| ------- ^^^^^^^^^^^^ this parameter takes ownership of the value
| |
| in this function

View File

@ -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

View File

@ -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<isize>) {}
| ---- ^^^^^^^^^^ 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

View File

@ -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<T:Send + std::fmt::Debug>(ch: Chan<T>, 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
|

View File

@ -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`

View File

@ -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>(_: 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

View File

@ -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>(_: 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

View File

@ -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>(_: 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

View File

@ -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

View File

@ -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<T>(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<T>(x: T) {}
| -------- ^ this type parameter takes ownership of the value
| -------- ^ this parameter takes ownership of the value
| |
| in this function

View File

@ -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<T>(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<T>(x: T) {}
| -------- ^ this type parameter takes ownership of the value
| -------- ^ this parameter takes ownership of the value
| |
| in this function

View File

@ -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: ?Sized>(_: T) {}
| ------------ ^ this type parameter takes ownership of the value
| ------------ ^ this parameter takes ownership of the value
| |
| in this function

View File

@ -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: ?Sized>(_: T) {}
| ------------ ^ this type parameter takes ownership of the value
| ------------ ^ this parameter takes ownership of the value
| |
| in this function

View File

@ -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<dyn ToString + 'static>) {
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type parameter takes ownership of the value
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value
| |
| in this method