Commit 278cc2f
committed
Auto merge of #29287 - Ryman:fn_nopat, r=alexcrichton
Previously, if you copied a signature from a trait definition such as:
```rust
fn foo<'a>(&'a Bar) -> bool {}
```
and moved it into an `impl`, there would be an error message:
"unexpected token `'a`"
Adding to the error message that a pattern is expected should help
users to find the actual problem with using a lifetime here.File tree
2 files changed
+29
-15
lines changed- src
- libsyntax/parse
- test/parse-fail
2 files changed
+29
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3196 | 3196 | | |
3197 | 3197 | | |
3198 | 3198 | | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
3199 | 3203 | | |
3200 | 3204 | | |
3201 | 3205 | | |
| |||
3272 | 3276 | | |
3273 | 3277 | | |
3274 | 3278 | | |
3275 | | - | |
3276 | | - | |
3277 | | - | |
3278 | | - | |
| 3279 | + | |
3279 | 3280 | | |
3280 | | - | |
| 3281 | + | |
3281 | 3282 | | |
3282 | 3283 | | |
3283 | 3284 | | |
3284 | 3285 | | |
3285 | 3286 | | |
3286 | 3287 | | |
3287 | 3288 | | |
3288 | | - | |
3289 | | - | |
3290 | | - | |
3291 | | - | |
| 3289 | + | |
3292 | 3290 | | |
3293 | 3291 | | |
3294 | 3292 | | |
| |||
3306 | 3304 | | |
3307 | 3305 | | |
3308 | 3306 | | |
3309 | | - | |
3310 | | - | |
3311 | | - | |
3312 | | - | |
3313 | 3307 | | |
3314 | | - | |
3315 | | - | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
3316 | 3314 | | |
3317 | 3315 | | |
3318 | 3316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments