-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
assume all sequences have (unique) spans for now #62831
Comments
The offending code is here: rust/src/libsyntax/ext/tt/macro_rules.rs Lines 653 to 655 in 299ef86
TBH, I'm not really sure what it is checking, and I don't have time to look into it right now (work is busy)... Sorry about that. It seems that the proc_macro is somehow generating some tokens or TokenTrees (especially in a It looks like pnkfelix wrote this code originally 4 years ago. It hasn't been touched in years. @petrochenkov do you know if there have been any changes in proc_macros that could have exposed this behavior? |
When 2 or more sequences share the same span, we can't use the precomputed map for their first set. So we compute it recursively. Fixes rust-lang#62831.
Implement slow-path for FirstSets::first When 2 or more sequences share the same span, we can't use the precomputed map for their first set. So we compute it recursively. Fixes rust-lang#62831.
Implement slow-path for FirstSets::first When 2 or more sequences share the same span, we can't use the precomputed map for their first set. So we compute it recursively. Fixes rust-lang#62831.
Implement slow-path for FirstSets::first When 2 or more sequences share the same span, we can't use the precomputed map for their first set. So we compute it recursively. Fixes rust-lang#62831.
Steps to reproduce:
Extract the archive delegate_impl.tar[1].gz
Run
cargo build
Run
cargo test
The following generated macro is a likely source of error:
However, directly putting this macro does not seem to cause a compiler crash: playground link
It appears that the crash only occurs when the macro-by-example generated from a proc-macro.
The full error message:
Using
--release
gives a similar result:You can try removing the first one or two parts in the macro pattern and the error disappears.
The text was updated successfully, but these errors were encountered: