-
Couldn't load subscription status.
- Fork 13.9k
Fix ICE from invalid delimeter in attrs parsing #147778
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
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
|
r? @nnethercote rustbot has assigned @nnethercote. Use |
6a86737 to
6400ed6
Compare
|
r? jdonszelmann |
|
could you modify the tests to use |
|
maybe add a comment about that too in the test |
|
well, actually, with |
|
okay, I think I just found a secondary ICE, let me look at that in isolation, though the root cause might be the same as this one |
|
okay, the other ICE is unrelated and handled here: #147841 |
|
I still think this fixes the wrong thing. Sure, the ICE is gone, but the error points to the wrong location and I'm not even 100% sure why it happens in the first place. Something seems to go fundamentally wrong in which brackets it chooses to match with? |
seems the span will contain the whole file when parser gets in the the scenario of expecting I remember for this case the span of here is not right already:
as I wrote in the description, I tried to fix the span, but haven't got a completed fix, I may continue to debug it when get time. another similar issue is here: #146834 |
|
it's only happen for |
|
Closing, in favor of #147849. See my explanation here: #146808 (comment) |
Fixes #146808
I tried hard to get the correct span, but didn't come out with a great result. I think maybe it's better to report an error when expand macro failing for contract:
rust/compiler/rustc_builtin_macros/src/contracts.rs
Line 50 in f524236