mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
febe4423c1
Fix `DebugParser`. I tried using this and it didn't work at all. `prev_token` is never eof, so the accumulator is always false, which means the `then_some` always returns `None`, which means `scan` always returns `None`, and `tokens` always ends up an empty vec. I'm not sure how this code was supposed to work. (An aside: I find `Iterator::scan` to be a pretty wretched function, that produces code which is very hard to understand. Probably why this is just one of two uses of it in the entire compiler.) This commit changes it to a simpler imperative style that produces a valid `tokens` vec. r? `@workingjubilee` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |