diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-01-05 17:08:15 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-01-12 19:36:28 -0800 |
| commit | a873337f2100ffa341f1a03e316ded6bfa2e95f7 (patch) | |
| tree | 4d958c48ff6af0249c6956681cfbb4aefaef3691 /src/test/ui/structs | |
| parent | c2d381d39d282c0586d50ea7d7a431ffd5ddb3fb (diff) | |
| download | rust-a873337f2100ffa341f1a03e316ded6bfa2e95f7.tar.gz rust-a873337f2100ffa341f1a03e316ded6bfa2e95f7.zip | |
Point at the match discriminant when arm pattern has a type mismatch
Diffstat (limited to 'src/test/ui/structs')
| -rw-r--r-- | src/test/ui/structs/structure-constructor-type-mismatch.stderr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr index 3c1ed8e69a6..564e3551065 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -109,6 +109,8 @@ LL | PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:54:9 | +LL | match (Point { x: 1, y: 2 }) { + | ---------------------- this match expression evaluates to `Point<{integer}>` LL | PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments | ^^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | @@ -118,6 +120,8 @@ LL | PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:59:9 | +LL | match (Point { x: 1, y: 2 }) { + | ---------------------- this match expression evaluates to `Point<{integer}>` LL | PointF { .. } => {} //~ ERROR mismatched types | ^^^^^^^^^^^^^ expected integer, found f32 | @@ -127,6 +131,8 @@ LL | PointF { .. } => {} //~ ERROR mismatched types error[E0308]: mismatched types --> $DIR/structure-constructor-type-mismatch.rs:67:9 | +LL | match (Pair { x: 1, y: 2 }) { + | --------------------- this match expression evaluates to `Pair<{integer}, {integer}>` LL | PairF::<u32> { .. } => {} //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^^^^ expected integer, found f32 | |
