-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustfmt_nightly: query stack during panic: end of query stack #6099
Comments
Thanks for the report, wondering if this is related to (#6082, rust-lang/rust#121487) and fixed by rust-lang/rust#121301 |
rust-lang/rust#121487 should fix this. |
@mzacho when you have a moment could you double check if this is resolved on the latest nightly? |
@ytmimi not OP, but i just checked on latest nightly (1.78.0-nightly (b6d2d841b 2024-03-05)) and I still have rustfmt crashing, although the stack is different:
|
@wmmc88 thanks for taking the time to look into this. I believe we're still waiting on #6082 to be resolved. I'm hopeful that rust-lang/rust#121301 will fix the issue on nightly once it's merged 🤞🏼 |
@mzacho or @wmmc88 when either of you have a moment can you confirm if this is resolved with the latest nightly. I've been testing with the latest nightly ( steps to verify:
|
@ytmimi Latest nightly cargo fmt works for me again. Thanks! |
@namanlp since you reached out on Zulip I was wondering if you'd want to get a little hands on experience adding a quick test case for this issue to close it out? I can explain more of the details of what I'm thinking on Zulip if you're interested. |
Hi there, I do understand the issue as well as the fix. Can you please tell me what to include in the test? ( I did see a few other tests to know how the tests should look in general ) Thank You |
@namanlp normally test cases are added to the tests/source directory, and formatted code is added to tests/target with the same name. This one is a little different because
You should be able to add another parser error test to src/test/parser.rs |
Hi @ytmimi , Yes, I can see that error. So, as per my understanding, I have to add the test files to tests/parser , and then, add a similar driver code here src/test/parser.rs Is that ok? |
@mzacho thanks for confirming!
@namanlp Yup, that should be it. I'd take a similar approach to the other tests in src/test/parser.rs If you want, you can also add the code snippet from #6082 (comment) as a separate test case, which deals with the same issue and contains a complete code snippet without any parse errors. No problem if not. If you choose to also include that code snippet all you'd need to do is add it to a file in the |
@namanlp are you still working on this? Otherwise I'd like to pick it up |
Hi, Sorry, this issue completely skipped out of my mind 😅 I will make a PR today. |
Hi,
When attempting to run
cargo fmt
on a the ill-typed (or maybe not even parsable?) library consisting of two files:lib.rs:
foo.rs
the compiler unexpectedly panics due to a failed assertion:
with rustc 1.78.0-nightly (fc3800f65 2024-02-26). Full stack-trace:
rustc-ice-2024-02-27T19_28_13-1514879.txt
I'm happy to work on this, but I'm a bit clueless as to what the issue is.
The text was updated successfully, but these errors were encountered: