Improve diagnostics when list of tokens has incorrect separators
Make `parse_seq_to_before_tokens` more resilient to error conditions. Where possible it is better if it can consume up to the final bracket before returning. This change improves the diagnostics in a couple of situations:
```
struct S(pub () ()); // omitted separator
use std::{foo. bar}; // used a similar but wrong separator
```
Fixes #44339
r? @petrochenkov
|
||
|---|---|---|
| .. | ||
| auxiliary | ||
| tuple-struct-fields | ||
| lookup-ignores-private.rs | ||
| private-in-public.rs | ||
| struct-literal-field.rs | ||
| test.rs | ||