= note: a binding must have the same type in all alternatives
error[E0308]: mismatched types
- --> $DIR/or-patterns-binding-type-mismatch.rs:55:39
+ --> $DIR/or-patterns-binding-type-mismatch.rs:55:40
|
-LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2);
- | - ^ ---------------- this expression has type `Blah`
- | | |
- | | expected `usize`, found `isize`
- | first introduced with type `usize` here
+LL | let (Blah::A(_, x, y) | Blah::B(x, y)) = Blah::A(1, 1, 2);
+ | - ^ ---------------- this expression has type `Blah`
+ | | |
+ | | expected `usize`, found `isize`
+ | first introduced with type `usize` here
|
= note: a binding must have the same type in all alternatives
error[E0308]: mismatched types
- --> $DIR/or-patterns-binding-type-mismatch.rs:58:19
+ --> $DIR/or-patterns-binding-type-mismatch.rs:58:20
|
-LL | let (x, y) | (y, x) = (0u8, 1u16);
- | - ^ ----------- this expression has type `(u8, u16)`
- | | |
- | | expected `u16`, found `u8`
- | first introduced with type `u16` here
+LL | let ((x, y) | (y, x)) = (0u8, 1u16);
+ | - ^ ----------- this expression has type `(u8, u16)`
+ | | |
+ | | expected `u16`, found `u8`
+ | first introduced with type `u16` here
|
= note: a binding must have the same type in all alternatives
error[E0308]: mismatched types
- --> $DIR/or-patterns-binding-type-mismatch.rs:58:22
+ --> $DIR/or-patterns-binding-type-mismatch.rs:58:23
|
-LL | let (x, y) | (y, x) = (0u8, 1u16);
- | - ^ ----------- this expression has type `(u8, u16)`
- | | |
- | | expected `u8`, found `u16`
- | first introduced with type `u8` here
+LL | let ((x, y) | (y, x)) = (0u8, 1u16);
+ | - ^ ----------- this expression has type `(u8, u16)`
+ | | |
+ | | expected `u8`, found `u16`
+ | first introduced with type `u8` here
|
= note: a binding must have the same type in all alternatives