|
| 1 | +error: expected a pattern, found an expression |
| 2 | + --> $DIR/recover-pat-exprs.rs:5:9 |
| 3 | + | |
| 4 | +LL | x.y => (), |
| 5 | + | ^^^ arbitrary expressions are not allowed in patterns |
| 6 | + |
| 7 | +error: expected a pattern, found an expression |
| 8 | + --> $DIR/recover-pat-exprs.rs:6:9 |
| 9 | + | |
| 10 | +LL | x.0 => (), |
| 11 | + | ^^^ arbitrary expressions are not allowed in patterns |
| 12 | + |
| 13 | +error: expected a pattern, found an expression |
| 14 | + --> $DIR/recover-pat-exprs.rs:7:9 |
| 15 | + | |
| 16 | +LL | x._0 => (), |
| 17 | + | ^^^^ arbitrary expressions are not allowed in patterns |
| 18 | + |
| 19 | +error: expected a pattern, found an expression |
| 20 | + --> $DIR/recover-pat-exprs.rs:8:9 |
| 21 | + | |
| 22 | +LL | x.0.1 => (), |
| 23 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 24 | + |
| 25 | +error: expected a pattern, found an expression |
| 26 | + --> $DIR/recover-pat-exprs.rs:9:9 |
| 27 | + | |
| 28 | +LL | x.4.y.17.__z => (), |
| 29 | + | ^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 30 | + |
| 31 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` |
| 32 | + --> $DIR/recover-pat-exprs.rs:12:12 |
| 33 | + | |
| 34 | +LL | { let x.0e0; } |
| 35 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 36 | + |
| 37 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` |
| 38 | + --> $DIR/recover-pat-exprs.rs:13:12 |
| 39 | + | |
| 40 | +LL | { let x.-0.0; } |
| 41 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 42 | + |
| 43 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` |
| 44 | + --> $DIR/recover-pat-exprs.rs:14:12 |
| 45 | + | |
| 46 | +LL | { let x.-0; } |
| 47 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 48 | + |
| 49 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` |
| 50 | + --> $DIR/recover-pat-exprs.rs:16:12 |
| 51 | + | |
| 52 | +LL | { let x.0u32; } |
| 53 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 54 | + |
| 55 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `.` |
| 56 | + --> $DIR/recover-pat-exprs.rs:17:12 |
| 57 | + | |
| 58 | +LL | { let x.0.0_f64; } |
| 59 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 60 | + |
| 61 | +error: expected a pattern, found an expression |
| 62 | + --> $DIR/recover-pat-exprs.rs:23:9 |
| 63 | + | |
| 64 | +LL | x[0] => (), |
| 65 | + | ^^^^ arbitrary expressions are not allowed in patterns |
| 66 | + |
| 67 | +error: expected a pattern, found an expression |
| 68 | + --> $DIR/recover-pat-exprs.rs:24:9 |
| 69 | + | |
| 70 | +LL | x[..] => (), |
| 71 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 72 | + |
| 73 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[` |
| 74 | + --> $DIR/recover-pat-exprs.rs:27:12 |
| 75 | + | |
| 76 | +LL | { let x[0, 1, 2]; } |
| 77 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 78 | + |
| 79 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[` |
| 80 | + --> $DIR/recover-pat-exprs.rs:28:12 |
| 81 | + | |
| 82 | +LL | { let x[0; 20]; } |
| 83 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 84 | + |
| 85 | +error: expected one of `:`, `;`, `=`, `@`, or `|`, found `[` |
| 86 | + --> $DIR/recover-pat-exprs.rs:29:12 |
| 87 | + | |
| 88 | +LL | { let x[]; } |
| 89 | + | ^ expected one of `:`, `;`, `=`, `@`, or `|` |
| 90 | + |
| 91 | +error: expected one of `)`, `,`, `@`, or `|`, found `[` |
| 92 | + --> $DIR/recover-pat-exprs.rs:30:13 |
| 93 | + | |
| 94 | +LL | { let (x[]); } |
| 95 | + | ^ |
| 96 | + | | |
| 97 | + | expected one of `)`, `,`, `@`, or `|` |
| 98 | + | help: missing `,` |
| 99 | + |
| 100 | +error: expected a pattern, found an expression |
| 101 | + --> $DIR/recover-pat-exprs.rs:37:9 |
| 102 | + | |
| 103 | +LL | x.f() => (), |
| 104 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 105 | + |
| 106 | +error: expected a pattern, found an expression |
| 107 | + --> $DIR/recover-pat-exprs.rs:38:9 |
| 108 | + | |
| 109 | +LL | x._f() => (), |
| 110 | + | ^^^^^^ arbitrary expressions are not allowed in patterns |
| 111 | + |
| 112 | +error: expected a pattern, found an expression |
| 113 | + --> $DIR/recover-pat-exprs.rs:39:9 |
| 114 | + | |
| 115 | +LL | x? => (), |
| 116 | + | ^^ arbitrary expressions are not allowed in patterns |
| 117 | + |
| 118 | +error: expected a pattern, found an expression |
| 119 | + --> $DIR/recover-pat-exprs.rs:40:9 |
| 120 | + | |
| 121 | +LL | ().f() => (), |
| 122 | + | ^^^^^^ arbitrary expressions are not allowed in patterns |
| 123 | + |
| 124 | +error: expected a pattern, found an expression |
| 125 | + --> $DIR/recover-pat-exprs.rs:41:9 |
| 126 | + | |
| 127 | +LL | (0, x)?.f() => (), |
| 128 | + | ^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 129 | + |
| 130 | +error: expected a pattern, found an expression |
| 131 | + --> $DIR/recover-pat-exprs.rs:42:9 |
| 132 | + | |
| 133 | +LL | x.f().g() => (), |
| 134 | + | ^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 135 | + |
| 136 | +error: expected a pattern, found an expression |
| 137 | + --> $DIR/recover-pat-exprs.rs:43:9 |
| 138 | + | |
| 139 | +LL | 0.f()?.g()?? => (), |
| 140 | + | ^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 141 | + |
| 142 | +error: expected a pattern, found an expression |
| 143 | + --> $DIR/recover-pat-exprs.rs:50:9 |
| 144 | + | |
| 145 | +LL | x as usize => (), |
| 146 | + | ^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 147 | + |
| 148 | +error: expected a pattern, found an expression |
| 149 | + --> $DIR/recover-pat-exprs.rs:51:9 |
| 150 | + | |
| 151 | +LL | 0 as usize => (), |
| 152 | + | ^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 153 | + |
| 154 | +error: expected a pattern, found an expression |
| 155 | + --> $DIR/recover-pat-exprs.rs:52:9 |
| 156 | + | |
| 157 | +LL | x.f().0.4 as f32 => (), |
| 158 | + | ^^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 159 | + |
| 160 | +error: expected a pattern, found an expression |
| 161 | + --> $DIR/recover-pat-exprs.rs:59:9 |
| 162 | + | |
| 163 | +LL | 1 + 1 => (), |
| 164 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 165 | + |
| 166 | +error: expected a pattern, found an expression |
| 167 | + --> $DIR/recover-pat-exprs.rs:60:10 |
| 168 | + | |
| 169 | +LL | (1 + 2) * 3 => (), |
| 170 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 171 | + |
| 172 | +error: expected a pattern, found an expression |
| 173 | + --> $DIR/recover-pat-exprs.rs:60:9 |
| 174 | + | |
| 175 | +LL | (1 + 2) * 3 => (), |
| 176 | + | ^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 177 | + |
| 178 | +error: expected a pattern, found an expression |
| 179 | + --> $DIR/recover-pat-exprs.rs:67:5 |
| 180 | + | |
| 181 | +LL | 1 + 2 * PI.cos() => 2, |
| 182 | + | ^^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 183 | + |
| 184 | +error: expected a pattern, found an expression |
| 185 | + --> $DIR/recover-pat-exprs.rs:73:9 |
| 186 | + | |
| 187 | +LL | u8::MAX.abs() => (), |
| 188 | + | ^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 189 | + |
| 190 | +error: expected a pattern, found an expression |
| 191 | + --> $DIR/recover-pat-exprs.rs:75:9 |
| 192 | + | |
| 193 | +LL | x.sqrt() @ .. => (), |
| 194 | + | ^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 195 | + |
| 196 | +error: left-hand side of `@` must be a binding |
| 197 | + --> $DIR/recover-pat-exprs.rs:75:9 |
| 198 | + | |
| 199 | +LL | x.sqrt() @ .. => (), |
| 200 | + | --------^^^-- |
| 201 | + | | | |
| 202 | + | | also a pattern |
| 203 | + | interpreted as a pattern, not a binding |
| 204 | + | |
| 205 | + = note: bindings are `x`, `mut x`, `ref x`, and `ref mut x` |
| 206 | + |
| 207 | +error: expected a pattern, found an expression |
| 208 | + --> $DIR/recover-pat-exprs.rs:78:17 |
| 209 | + | |
| 210 | +LL | z @ w @ v.u() => (), |
| 211 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 212 | + |
| 213 | +error: expected a pattern, found an expression |
| 214 | + --> $DIR/recover-pat-exprs.rs:80:9 |
| 215 | + | |
| 216 | +LL | y.ilog(3) => (), |
| 217 | + | ^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 218 | + |
| 219 | +error: expected a pattern, found an expression |
| 220 | + --> $DIR/recover-pat-exprs.rs:82:9 |
| 221 | + | |
| 222 | +LL | n + 1 => (), |
| 223 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 224 | + |
| 225 | +error: expected a pattern, found an expression |
| 226 | + --> $DIR/recover-pat-exprs.rs:84:10 |
| 227 | + | |
| 228 | +LL | ("".f() + 14 * 8) => (), |
| 229 | + | ^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns |
| 230 | + |
| 231 | +error: expected a pattern, found an expression |
| 232 | + --> $DIR/recover-pat-exprs.rs:87:9 |
| 233 | + | |
| 234 | +LL | f?() => (), |
| 235 | + | ^^^^ arbitrary expressions are not allowed in patterns |
| 236 | + |
| 237 | +error: expected one of `)`, `,`, or `|`, found `+` |
| 238 | + --> $DIR/recover-pat-exprs.rs:89:12 |
| 239 | + | |
| 240 | +LL | (_ + 1) => (), |
| 241 | + | ^ expected one of `)`, `,`, or `|` |
| 242 | + |
| 243 | +error: expected a pattern, found an expression |
| 244 | + --> $DIR/recover-pat-exprs.rs:93:9 |
| 245 | + | |
| 246 | +LL | let 1 + 1 = 2; |
| 247 | + | ^^^^^ arbitrary expressions are not allowed in patterns |
| 248 | + |
| 249 | +error: expected one of `)`, `,`, `@`, or `|`, found `*` |
| 250 | + --> $DIR/recover-pat-exprs.rs:96:28 |
| 251 | + | |
| 252 | +LL | let b = matches!(x, (x * x | x.f()) | x[0]); |
| 253 | + | ^ expected one of `)`, `,`, `@`, or `|` |
| 254 | + --> $SRC_DIR/core/src/macros/mod.rs:LL:COL |
| 255 | + | |
| 256 | + = note: while parsing argument for this `pat` macro fragment |
| 257 | + |
| 258 | +error: aborting due to 41 previous errors |
| 259 | + |
0 commit comments