diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/binop/binop-consume-args.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/binop/binop-consume-args.stderr')
-rw-r--r-- | tests/ui/binop/binop-consume-args.stderr | 333 |
1 files changed, 333 insertions, 0 deletions
diff --git a/tests/ui/binop/binop-consume-args.stderr b/tests/ui/binop/binop-consume-args.stderr new file mode 100644 index 000000000..6fbbb5543 --- /dev/null +++ b/tests/ui/binop/binop-consume-args.stderr @@ -0,0 +1,333 @@ +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:7:10 + | +LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs + rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL +help: consider further restricting this bound + | +LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:8:10 + | +LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs + rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn add<A: Add<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:13:10 + | +LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs - rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL +help: consider further restricting this bound + | +LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:14:10 + | +LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs - rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn sub<A: Sub<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:19:10 + | +LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs * rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL +help: consider further restricting this bound + | +LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:20:10 + | +LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs * rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn mul<A: Mul<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:25:10 + | +LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs / rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL +help: consider further restricting this bound + | +LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:26:10 + | +LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs / rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn div<A: Div<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:31:10 + | +LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs % rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/arith.rs:LL:COL +help: consider further restricting this bound + | +LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:32:10 + | +LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs % rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn rem<A: Rem<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:37:10 + | +LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs & rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/bit.rs:LL:COL +help: consider further restricting this bound + | +LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:38:10 + | +LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs & rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn bitand<A: BitAnd<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:43:10 + | +LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs | rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/bit.rs:LL:COL +help: consider further restricting this bound + | +LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:44:10 + | +LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs | rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn bitor<A: BitOr<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:49:10 + | +LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs ^ rhs; + | --------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/bit.rs:LL:COL +help: consider further restricting this bound + | +LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:50:10 + | +LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs ^ rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn bitxor<A: BitXor<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:55:10 + | +LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs << rhs; + | ---------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/bit.rs:LL:COL +help: consider further restricting this bound + | +LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:56:10 + | +LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs << rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn shl<A: Shl<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `lhs` + --> $DIR/binop-consume-args.rs:61:10 + | +LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `lhs` has type `A`, which does not implement the `Copy` trait +LL | lhs >> rhs; + | ---------- `lhs` moved due to usage in operator +LL | drop(lhs); + | ^^^ value used here after move + | +note: calling this operator moves the left-hand side + --> $SRC_DIR/core/src/ops/bit.rs:LL:COL +help: consider further restricting this bound + | +LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) { + | ++++++ + +error[E0382]: use of moved value: `rhs` + --> $DIR/binop-consume-args.rs:62:10 + | +LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) { + | --- move occurs because `rhs` has type `B`, which does not implement the `Copy` trait +LL | lhs >> rhs; + | --- value moved here +LL | drop(lhs); +LL | drop(rhs); + | ^^^ value used here after move + | +help: consider restricting type parameter `B` + | +LL | fn shr<A: Shr<B, Output=()>, B: Copy>(lhs: A, rhs: B) { + | ++++++ + +error: aborting due to 20 previous errors + +For more information about this error, try `rustc --explain E0382`. |