|
1 | 1 | error[E0308]: mismatched types
|
2 |
| - --> $DIR/or-pattern-mismatch.rs:3:68 |
| 2 | + --> $DIR/or-pattern-mismatch.rs:13:39 |
3 | 3 | |
|
4 |
| -LL | fn main() { match Blah::A(1, 1, 2) { Blah::A(_, x, y) | Blah::B(x, y) => { } } } |
5 |
| - | ---------------- this expression has type `Blah` ^ expected `usize`, found `isize` |
| 4 | +LL | match Blah::A(1, 1, 2) { |
| 5 | + | ---------------- this expression has type `main::Blah` |
| 6 | +LL | Blah::A(_, x, y) | Blah::B(x, y) => {} |
| 7 | + | ^ expected `usize`, found `isize` |
6 | 8 |
|
7 |
| -error: aborting due to previous error |
| 9 | +error[E0308]: mismatched types |
| 10 | + --> $DIR/or-pattern-mismatch.rs:17:44 |
| 11 | + | |
| 12 | +LL | match Some(Blah::A(1, 1, 2)) { |
| 13 | + | ---------------------- this expression has type `std::option::Option<main::Blah>` |
| 14 | +LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {} |
| 15 | + | ^ expected `usize`, found `isize` |
| 16 | + |
| 17 | +error[E0308]: mismatched types |
| 18 | + --> $DIR/or-pattern-mismatch.rs:21:19 |
| 19 | + | |
| 20 | +LL | match (0u8, 1u16) { |
| 21 | + | ----------- this expression has type `(u8, u16)` |
| 22 | +LL | (x, y) | (y, x) => {} |
| 23 | + | ^ expected `u16`, found `u8` |
| 24 | + |
| 25 | +error[E0308]: mismatched types |
| 26 | + --> $DIR/or-pattern-mismatch.rs:21:22 |
| 27 | + | |
| 28 | +LL | match (0u8, 1u16) { |
| 29 | + | ----------- this expression has type `(u8, u16)` |
| 30 | +LL | (x, y) | (y, x) => {} |
| 31 | + | ^ expected `u8`, found `u16` |
| 32 | + |
| 33 | +error[E0308]: mismatched types |
| 34 | + --> $DIR/or-pattern-mismatch.rs:26:41 |
| 35 | + | |
| 36 | +LL | match Some((0u8, Some((1u16, 2u32)))) { |
| 37 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 38 | +LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} |
| 39 | + | ^ expected `u16`, found `u8` |
| 40 | + |
| 41 | +error[E0308]: mismatched types |
| 42 | + --> $DIR/or-pattern-mismatch.rs:26:50 |
| 43 | + | |
| 44 | +LL | match Some((0u8, Some((1u16, 2u32)))) { |
| 45 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 46 | +LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} |
| 47 | + | ^ expected `u8`, found `u16` |
| 48 | + |
| 49 | +error[E0308]: mismatched types |
| 50 | + --> $DIR/or-pattern-mismatch.rs:26:59 |
| 51 | + | |
| 52 | +LL | match Some((0u8, Some((1u16, 2u32)))) { |
| 53 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 54 | +LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} |
| 55 | + | ^ expected `u32`, found `u16` |
| 56 | + |
| 57 | +error[E0308]: mismatched types |
| 58 | + --> $DIR/or-pattern-mismatch.rs:26:62 |
| 59 | + | |
| 60 | +LL | match Some((0u8, Some((1u16, 2u32)))) { |
| 61 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 62 | +LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} |
| 63 | + | ^ expected `u8`, found `u32` |
| 64 | + |
| 65 | +error[E0308]: mismatched types |
| 66 | + --> $DIR/or-pattern-mismatch.rs:34:42 |
| 67 | + | |
| 68 | +LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) { |
| 69 | + | ^ ---------------- this expression has type `main::Blah` |
| 70 | + | | |
| 71 | + | expected `usize`, found `isize` |
| 72 | + |
| 73 | +error[E0308]: mismatched types |
| 74 | + --> $DIR/or-pattern-mismatch.rs:38:47 |
| 75 | + | |
| 76 | +LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) { |
| 77 | + | ^ ---------------------- this expression has type `std::option::Option<main::Blah>` |
| 78 | + | | |
| 79 | + | expected `usize`, found `isize` |
| 80 | + |
| 81 | +error[E0308]: mismatched types |
| 82 | + --> $DIR/or-pattern-mismatch.rs:42:22 |
| 83 | + | |
| 84 | +LL | if let (x, y) | (y, x) = (0u8, 1u16) { |
| 85 | + | ^ ----------- this expression has type `(u8, u16)` |
| 86 | + | | |
| 87 | + | expected `u16`, found `u8` |
| 88 | + |
| 89 | +error[E0308]: mismatched types |
| 90 | + --> $DIR/or-pattern-mismatch.rs:42:25 |
| 91 | + | |
| 92 | +LL | if let (x, y) | (y, x) = (0u8, 1u16) { |
| 93 | + | ^ ----------- this expression has type `(u8, u16)` |
| 94 | + | | |
| 95 | + | expected `u8`, found `u16` |
| 96 | + |
| 97 | +error[E0308]: mismatched types |
| 98 | + --> $DIR/or-pattern-mismatch.rs:47:44 |
| 99 | + | |
| 100 | +LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) |
| 101 | + | ^ expected `u16`, found `u8` |
| 102 | +... |
| 103 | +LL | = Some((0u8, Some((1u16, 2u32)))) |
| 104 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 105 | + |
| 106 | +error[E0308]: mismatched types |
| 107 | + --> $DIR/or-pattern-mismatch.rs:47:53 |
| 108 | + | |
| 109 | +LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) |
| 110 | + | ^ expected `u8`, found `u16` |
| 111 | +... |
| 112 | +LL | = Some((0u8, Some((1u16, 2u32)))) |
| 113 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 114 | + |
| 115 | +error[E0308]: mismatched types |
| 116 | + --> $DIR/or-pattern-mismatch.rs:47:62 |
| 117 | + | |
| 118 | +LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) |
| 119 | + | ^ expected `u32`, found `u16` |
| 120 | +... |
| 121 | +LL | = Some((0u8, Some((1u16, 2u32)))) |
| 122 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 123 | + |
| 124 | +error[E0308]: mismatched types |
| 125 | + --> $DIR/or-pattern-mismatch.rs:47:65 |
| 126 | + | |
| 127 | +LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) |
| 128 | + | ^ expected `u8`, found `u32` |
| 129 | +... |
| 130 | +LL | = Some((0u8, Some((1u16, 2u32)))) |
| 131 | + | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` |
| 132 | + |
| 133 | +error[E0308]: mismatched types |
| 134 | + --> $DIR/or-pattern-mismatch.rs:55:39 |
| 135 | + | |
| 136 | +LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2); |
| 137 | + | ^ ---------------- this expression has type `main::Blah` |
| 138 | + | | |
| 139 | + | expected `usize`, found `isize` |
| 140 | + |
| 141 | +error[E0308]: mismatched types |
| 142 | + --> $DIR/or-pattern-mismatch.rs:58:19 |
| 143 | + | |
| 144 | +LL | let (x, y) | (y, x) = (0u8, 1u16); |
| 145 | + | ^ ----------- this expression has type `(u8, u16)` |
| 146 | + | | |
| 147 | + | expected `u16`, found `u8` |
| 148 | + |
| 149 | +error[E0308]: mismatched types |
| 150 | + --> $DIR/or-pattern-mismatch.rs:58:22 |
| 151 | + | |
| 152 | +LL | let (x, y) | (y, x) = (0u8, 1u16); |
| 153 | + | ^ ----------- this expression has type `(u8, u16)` |
| 154 | + | | |
| 155 | + | expected `u8`, found `u16` |
| 156 | + |
| 157 | +error[E0308]: mismatched types |
| 158 | + --> $DIR/or-pattern-mismatch.rs:62:42 |
| 159 | + | |
| 160 | +LL | fn f1((Blah::A(_, x, y) | Blah::B(x, y)): Blah) {} |
| 161 | + | ^ ---- expected due to this |
| 162 | + | | |
| 163 | + | expected `usize`, found `isize` |
| 164 | + |
| 165 | +error[E0308]: mismatched types |
| 166 | + --> $DIR/or-pattern-mismatch.rs:65:22 |
| 167 | + | |
| 168 | +LL | fn f2(((x, y) | (y, x)): (u8, u16)) {} |
| 169 | + | ^ --------- expected due to this |
| 170 | + | | |
| 171 | + | expected `u16`, found `u8` |
| 172 | + |
| 173 | +error[E0308]: mismatched types |
| 174 | + --> $DIR/or-pattern-mismatch.rs:65:25 |
| 175 | + | |
| 176 | +LL | fn f2(((x, y) | (y, x)): (u8, u16)) {} |
| 177 | + | ^ --------- expected due to this |
| 178 | + | | |
| 179 | + | expected `u8`, found `u16` |
| 180 | + |
| 181 | +error: aborting due to 22 previous errors |
8 | 182 |
|
9 | 183 | For more information about this error, try `rustc --explain E0308`.
|
0 commit comments