about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-06 08:17:34 +0200
committerGitHub <noreply@github.com>2019-08-06 08:17:34 +0200
commit61e270ab4866d5f1920a42809a3b7016e0d59298 (patch)
tree768eac02a16923f52df3f2615bf581a73ca5037a /src/test/debuginfo/enum-thinlto.rs
parentfe998dbfe496d05dc1536820ab9611bd3281a7f2 (diff)
parentb3e8c8bbe27e21a2e67039d9fb9ea41cb83b1499 (diff)
downloadrust-61e270ab4866d5f1920a42809a3b7016e0d59298.tar.gz
rust-61e270ab4866d5f1920a42809a3b7016e0d59298.zip
Rollup merge of #63017 - matklad:no-fatal, r=petrochenkov
Remove special code-path for handing unknown tokens

In `StringReader`, we have a buffer of fatal errors, which is used only in a single case: when we see something which is not a reasonable token at all, like `🦀`. I think a more straightforward thing to do here is to produce an explicit error token in this case, and let the next layer (the parser), deal with it.

However currently this leads to duplicated error messages. What should we do with this? Naively, I would think that emitting (just emitting, not raising) `FatalError` should stop other errors, but looks like this is not the case? We can also probably tweak parser on the case-by-case basis, to avoid emitting "expected" errors if the current token is an `Err`. I personally also fine with cascading errors in this case: it's quite unlikely that you actually type a fully invalid token.

@petrochenkov, which approach should we take to fight cascading errors?
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions