Skip to content

Conversation

@shulaoda
Copy link
Contributor

closes #6099

This one is a little different because const BAR = 42; will be rejected by the parser. You should see a similar error message if you run rustfmt on that input:


error: missing type for `const` item

 --> <stdin>:1:10

  |

1 | const BAR = 42;

  |          ^ help: provide a type for the item: `: <type>`

You should be able to add another parser error test to src/test/parser.rs

Originally posted by @ytmimi in #6099

@jieyouxu
Copy link
Member

Same as #6692 (comment), there's already a regression test for the root cause of not explicitly handling stashed diagnostics. I don't think these explicit cases meaningfully improve the coverage, because, well, it's the same root cause.

Regardless, thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustfmt_nightly: query stack during panic: end of query stack

3 participants