-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Support #![recursion_limit]
attribute
#11360
Conversation
😍 does this fix #4243 (comment) too? |
I think you need to rebase on top of |
c803843
to
6d18c5b
Compare
This allows fetching crate limits like `recursion_limit`. The implementation is currently dummy and just returns the defaults. Future work: Use this query instead of the hardcoded constant. Future work: Actually implement this query by parsing `#![recursion_limit = N]` attribute.
This patch makes RA understand `#![recursion_limit = "N"]` annotations. - `crate_limits` query is moved to `DefDatabase` - `DefMap` now has `recursion_limit: Option<u32>` field
@lnicola |
|
Yeah, your PR fixes #4243 for me, at least in the |
@lnicola wait 🤔 If RA ignores the limit (without this PR anyway) how can increasing it help? And since
The weird part is that it doesn't for me, lol. I wander what's up with that 🤔 |
RA used to bail out after 128 expansions, now your PR makes it run to the end. |
bors r+ |
Resolves #8640
@matklad thanks, for the instructions, they were very helpful :)