summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/binop/binary-op-on-double-ref.stderr2
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.fixed8
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.rs8
-rw-r--r--tests/ui/binop/binary-op-suggest-deref.stderr14
-rw-r--r--tests/ui/binop/binop-bitxor-str.stderr2
-rw-r--r--tests/ui/binop/binop-mul-bool.stderr2
-rw-r--r--tests/ui/binop/binop-mul-i32-f32.stderr2
-rw-r--r--tests/ui/binop/binop-typeck.stderr2
-rw-r--r--tests/ui/binop/eq-arr.stderr2
-rw-r--r--tests/ui/binop/eq-vec.stderr2
-rw-r--r--tests/ui/binop/false-binop-caused-by-missing-semi.stderr2
-rw-r--r--tests/ui/binop/issue-3820.stderr2
-rw-r--r--tests/ui/binop/issue-77910-2.stderr2
-rw-r--r--tests/ui/binop/issue-93927.stderr2
-rw-r--r--tests/ui/binop/placement-syntax.stderr2
15 files changed, 42 insertions, 12 deletions
diff --git a/tests/ui/binop/binary-op-on-double-ref.stderr b/tests/ui/binop/binary-op-on-double-ref.stderr
index 2e8aeebc6..d1d1d7707 100644
--- a/tests/ui/binop/binary-op-on-double-ref.stderr
+++ b/tests/ui/binop/binary-op-on-double-ref.stderr
@@ -11,6 +11,6 @@ help: `%` can be used on `&{integer}` if you dereference the left-hand side
LL | *x % 2 == 0
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binary-op-suggest-deref.fixed b/tests/ui/binop/binary-op-suggest-deref.fixed
new file mode 100644
index 000000000..1ff359913
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.fixed
@@ -0,0 +1,8 @@
+// Issue #52544
+// run-rustfix
+
+fn main() {
+ let i: &i64 = &1;
+ if *i < 0 {}
+ //~^ ERROR mismatched types [E0308]
+}
diff --git a/tests/ui/binop/binary-op-suggest-deref.rs b/tests/ui/binop/binary-op-suggest-deref.rs
new file mode 100644
index 000000000..12505a9ac
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.rs
@@ -0,0 +1,8 @@
+// Issue #52544
+// run-rustfix
+
+fn main() {
+ let i: &i64 = &1;
+ if i < 0 {}
+ //~^ ERROR mismatched types [E0308]
+}
diff --git a/tests/ui/binop/binary-op-suggest-deref.stderr b/tests/ui/binop/binary-op-suggest-deref.stderr
new file mode 100644
index 000000000..d1d0089ec
--- /dev/null
+++ b/tests/ui/binop/binary-op-suggest-deref.stderr
@@ -0,0 +1,14 @@
+error[E0308]: mismatched types
+ --> $DIR/binary-op-suggest-deref.rs:6:12
+ |
+LL | if i < 0 {}
+ | ^ expected `&i64`, found integer
+ |
+help: consider dereferencing the borrow
+ |
+LL | if *i < 0 {}
+ | +
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/binop/binop-bitxor-str.stderr b/tests/ui/binop/binop-bitxor-str.stderr
index f236cd61e..20b1ecc5a 100644
--- a/tests/ui/binop/binop-bitxor-str.stderr
+++ b/tests/ui/binop/binop-bitxor-str.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let x = "a".to_string() ^ "b".to_string(); }
| |
| String
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binop-mul-bool.stderr b/tests/ui/binop/binop-mul-bool.stderr
index 8b5cde63c..82d066f45 100644
--- a/tests/ui/binop/binop-mul-bool.stderr
+++ b/tests/ui/binop/binop-mul-bool.stderr
@@ -6,6 +6,6 @@ LL | fn main() { let x = true * false; }
| |
| bool
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/binop-mul-i32-f32.stderr b/tests/ui/binop/binop-mul-i32-f32.stderr
index 115e70006..6ed3e7b44 100644
--- a/tests/ui/binop/binop-mul-i32-f32.stderr
+++ b/tests/ui/binop/binop-mul-i32-f32.stderr
@@ -11,6 +11,6 @@ LL | x * y
<&'a i32 as Mul<i32>>
<&i32 as Mul<&i32>>
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/binop/binop-typeck.stderr b/tests/ui/binop/binop-typeck.stderr
index 42d910819..da7f31828 100644
--- a/tests/ui/binop/binop-typeck.stderr
+++ b/tests/ui/binop/binop-typeck.stderr
@@ -6,6 +6,6 @@ LL | let z = x + y;
| |
| bool
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-arr.stderr b/tests/ui/binop/eq-arr.stderr
index a22f8e3ab..afcfb7b28 100644
--- a/tests/ui/binop/eq-arr.stderr
+++ b/tests/ui/binop/eq-arr.stderr
@@ -17,6 +17,6 @@ LL + #[derive(PartialEq)]
LL | struct X;
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-vec.stderr b/tests/ui/binop/eq-vec.stderr
index 0a98cddfe..147397528 100644
--- a/tests/ui/binop/eq-vec.stderr
+++ b/tests/ui/binop/eq-vec.stderr
@@ -19,6 +19,6 @@ LL + #[derive(PartialEq)]
LL | enum Foo {
|
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.stderr b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
index fca042b1c..eeb6b028a 100644
--- a/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
+++ b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
@@ -12,6 +12,6 @@ help: you might have meant to write a semicolon here
LL | foo();
| +
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/binop/issue-3820.stderr b/tests/ui/binop/issue-3820.stderr
index cfa78a41d..7cce93dca 100644
--- a/tests/ui/binop/issue-3820.stderr
+++ b/tests/ui/binop/issue-3820.stderr
@@ -14,6 +14,6 @@ LL | struct Thing {
note: the trait `Mul` must be implemented
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-77910-2.stderr b/tests/ui/binop/issue-77910-2.stderr
index b3856b6ae..e58ae0fad 100644
--- a/tests/ui/binop/issue-77910-2.stderr
+++ b/tests/ui/binop/issue-77910-2.stderr
@@ -11,6 +11,6 @@ help: use parentheses to call this function
LL | if foo(/* &i32 */) == y {}
| ++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-93927.stderr b/tests/ui/binop/issue-93927.stderr
index 75558b502..9bcf2b173 100644
--- a/tests/ui/binop/issue-93927.stderr
+++ b/tests/ui/binop/issue-93927.stderr
@@ -11,6 +11,6 @@ help: consider further restricting this bound
LL | fn cond<T: PartialEq + std::cmp::Eq>(val: MyType<T>) -> bool {
| ++++++++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/placement-syntax.stderr b/tests/ui/binop/placement-syntax.stderr
index 3fdaf4cd0..b20a2ee63 100644
--- a/tests/ui/binop/placement-syntax.stderr
+++ b/tests/ui/binop/placement-syntax.stderr
@@ -9,5 +9,5 @@ help: if you meant to write a comparison against a negative value, add a space i
LL | if x< -1 {
| ~~~
-error: aborting due to previous error
+error: aborting due to 1 previous error