about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-02 15:56:37 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-08 15:30:57 -0800
commit132a140214522246bef5da015f5cfb78da7074be (patch)
tree3063ec56e754ec057a39742837a94082ac6e17fc /src/test/ui/parser
parent01fbc5ae789fc0c7a2da71d3cd908451f175e4eb (diff)
Point at LHS on binop type err if relevant
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/bare-struct-body.stderr4
-rw-r--r--src/test/ui/parser/chained-comparison-suggestion.stderr24
2 files changed, 21 insertions, 7 deletions
diff --git a/src/test/ui/parser/bare-struct-body.stderr b/src/test/ui/parser/bare-struct-body.stderr
index c77992b2c34..7d17ea59647 100644
--- a/src/test/ui/parser/bare-struct-body.stderr
+++ b/src/test/ui/parser/bare-struct-body.stderr
@@ -34,7 +34,9 @@ error[E0308]: mismatched types
   --> $DIR/bare-struct-body.rs:11:14
    |
 LL |     x.val == 42;
-   |              ^^ expected `()`, found integer
+   |     -----    ^^ expected `()`, found integer
+   |     |
+   |     expected because this is `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/chained-comparison-suggestion.stderr b/src/test/ui/parser/chained-comparison-suggestion.stderr
index 694b0b6eb02..ae243816d7c 100644
--- a/src/test/ui/parser/chained-comparison-suggestion.stderr
+++ b/src/test/ui/parser/chained-comparison-suggestion.stderr
@@ -123,37 +123,49 @@ error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:4:14
    |
 LL |     1 < 2 <= 3;
-   |              ^ expected `bool`, found integer
+   |     -----    ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:13:14
    |
 LL |     1 <= 2 < 3;
-   |              ^ expected `bool`, found integer
+   |     ------   ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:18:15
    |
 LL |     1 <= 2 <= 3;
-   |               ^ expected `bool`, found integer
+   |     ------    ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:23:14
    |
 LL |     1 > 2 >= 3;
-   |              ^ expected `bool`, found integer
+   |     -----    ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:36:15
    |
 LL |     1 >= 2 >= 3;
-   |               ^ expected `bool`, found integer
+   |     ------    ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error[E0308]: mismatched types
   --> $DIR/chained-comparison-suggestion.rs:49:15
    |
 LL |     1 == 2 == 3;
-   |               ^ expected `bool`, found integer
+   |     ------    ^ expected `bool`, found integer
+   |     |
+   |     expected because this is `bool`
 
 error: aborting due to 17 previous errors