summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/binop
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/binop/binary-op-on-double-ref.fixed2
-rw-r--r--tests/ui/binop/binary-op-on-double-ref.rs2
-rw-r--r--tests/ui/binop/binary-op-on-double-ref.stderr2
-rw-r--r--tests/ui/binop/binop-move-semantics.stderr5
-rw-r--r--tests/ui/binop/issue-28837.rs2
-rw-r--r--tests/ui/binop/issue-28837.stderr2
6 files changed, 10 insertions, 5 deletions
diff --git a/tests/ui/binop/binary-op-on-double-ref.fixed b/tests/ui/binop/binary-op-on-double-ref.fixed
index de9dc19af..586d2568c 100644
--- a/tests/ui/binop/binary-op-on-double-ref.fixed
+++ b/tests/ui/binop/binary-op-on-double-ref.fixed
@@ -3,7 +3,7 @@ fn main() {
let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
let vr = v.iter().filter(|x| {
*x % 2 == 0
- //~^ ERROR cannot mod `&&{integer}` by `{integer}`
+ //~^ ERROR cannot calculate the remainder of `&&{integer}` divided by `{integer}`
});
println!("{:?}", vr);
}
diff --git a/tests/ui/binop/binary-op-on-double-ref.rs b/tests/ui/binop/binary-op-on-double-ref.rs
index 2616c560c..48ee44546 100644
--- a/tests/ui/binop/binary-op-on-double-ref.rs
+++ b/tests/ui/binop/binary-op-on-double-ref.rs
@@ -3,7 +3,7 @@ fn main() {
let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
let vr = v.iter().filter(|x| {
x % 2 == 0
- //~^ ERROR cannot mod `&&{integer}` by `{integer}`
+ //~^ ERROR cannot calculate the remainder of `&&{integer}` divided by `{integer}`
});
println!("{:?}", vr);
}
diff --git a/tests/ui/binop/binary-op-on-double-ref.stderr b/tests/ui/binop/binary-op-on-double-ref.stderr
index 34826d2f4..2e8aeebc6 100644
--- a/tests/ui/binop/binary-op-on-double-ref.stderr
+++ b/tests/ui/binop/binary-op-on-double-ref.stderr
@@ -1,4 +1,4 @@
-error[E0369]: cannot mod `&&{integer}` by `{integer}`
+error[E0369]: cannot calculate the remainder of `&&{integer}` divided by `{integer}`
--> $DIR/binary-op-on-double-ref.rs:5:11
|
LL | x % 2 == 0
diff --git a/tests/ui/binop/binop-move-semantics.stderr b/tests/ui/binop/binop-move-semantics.stderr
index dae267da0..8645169b9 100644
--- a/tests/ui/binop/binop-move-semantics.stderr
+++ b/tests/ui/binop/binop-move-semantics.stderr
@@ -41,6 +41,8 @@ LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
error[E0505]: cannot move out of `x` because it is borrowed
--> $DIR/binop-move-semantics.rs:21:5
|
+LL | fn move_borrowed<T: Add<Output=()>>(x: T, mut y: T) {
+ | - binding `x` declared here
LL | let m = &x;
| -- borrow of `x` occurs here
...
@@ -53,6 +55,9 @@ LL | use_mut(n); use_imm(m);
error[E0505]: cannot move out of `y` because it is borrowed
--> $DIR/binop-move-semantics.rs:23:5
|
+LL | fn move_borrowed<T: Add<Output=()>>(x: T, mut y: T) {
+ | ----- binding `y` declared here
+LL | let m = &x;
LL | let n = &mut y;
| ------ borrow of `y` occurs here
...
diff --git a/tests/ui/binop/issue-28837.rs b/tests/ui/binop/issue-28837.rs
index 9719c3afa..54c8838e4 100644
--- a/tests/ui/binop/issue-28837.rs
+++ b/tests/ui/binop/issue-28837.rs
@@ -11,7 +11,7 @@ fn main() {
a / a; //~ ERROR cannot divide `A` by `A`
- a % a; //~ ERROR cannot mod `A` by `A`
+ a % a; //~ ERROR cannot calculate the remainder of `A` divided by `A`
a & a; //~ ERROR no implementation for `A & A`
diff --git a/tests/ui/binop/issue-28837.stderr b/tests/ui/binop/issue-28837.stderr
index 6e236ca52..cca1da3b6 100644
--- a/tests/ui/binop/issue-28837.stderr
+++ b/tests/ui/binop/issue-28837.stderr
@@ -62,7 +62,7 @@ LL | struct A;
note: the trait `Div` must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-error[E0369]: cannot mod `A` by `A`
+error[E0369]: cannot calculate the remainder of `A` divided by `A`
--> $DIR/issue-28837.rs:14:7
|
LL | a % a;