summaryrefslogtreecommitdiffstats
path: root/tests/ui/type/type-check/assignment-in-if.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/type/type-check/assignment-in-if.stderr')
-rw-r--r--tests/ui/type/type-check/assignment-in-if.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/type/type-check/assignment-in-if.stderr b/tests/ui/type/type-check/assignment-in-if.stderr
index 9f4558ada..de133e559 100644
--- a/tests/ui/type/type-check/assignment-in-if.stderr
+++ b/tests/ui/type/type-check/assignment-in-if.stderr
@@ -67,6 +67,9 @@ LL | x == 5
error[E0308]: mismatched types
--> $DIR/assignment-in-if.rs:44:18
|
+LL | if y = (Foo { foo: x }) {
+ | - here the type of `x` is inferred to be `usize`
+...
LL | if x == x && x = x && x == x {
| ------ ^ expected `bool`, found `usize`
| |
@@ -75,6 +78,9 @@ LL | if x == x && x = x && x == x {
error[E0308]: mismatched types
--> $DIR/assignment-in-if.rs:44:22
|
+LL | if y = (Foo { foo: x }) {
+ | - here the type of `x` is inferred to be `usize`
+...
LL | if x == x && x = x && x == x {
| ^ expected `bool`, found `usize`
@@ -92,6 +98,9 @@ LL | if x == x && x == x && x == x {
error[E0308]: mismatched types
--> $DIR/assignment-in-if.rs:51:28
|
+LL | if y = (Foo { foo: x }) {
+ | - here the type of `x` is inferred to be `usize`
+...
LL | if x == x && x == x && x = x {
| ---------------- ^ expected `bool`, found `usize`
| |