Skip to content
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

Render HRTBs for WherePredicate::BoundPredicate #92

Merged
merged 1 commit into from
May 21, 2022

Conversation

Enselic
Copy link
Owner

@Enselic Enselic commented May 2, 2022

This makes us render HRTBs for WherePredicate::BoundPredicate.

This PR depends on rust-lang/rust#96647

Part of fixing #88

JohnTitor added a commit to JohnTitor/rust that referenced this pull request May 17, 2022
…, r=CraftSpider

rustdoc-json: Fix HRTBs for WherePredicate::BoundPredicate

Information about HRTBs are already present for `GenericBound:: TraitBound` and `FunctionPointer`. This PR adds HRTB info also to `WherePredicate::BoundPredicate`.

Use the same field name and type as for the other ones (`generic_params: Vec<GenericParamDef>`). I have verified that this gives rustdoc JSON clients the data they need and in a format that is easy to work with (see Enselic/public-api#92).

I will be happy to add tests for this change (and bump `FORMAT_VERSION` which I just realized I forgot), but it is always nice to get one round of feedback first, so that I don't put a lot of effort into tests that then have to be discarded.

`@rustbot` modify labels: +T-rustdoc +A-rustdoc-json
@Enselic Enselic force-pushed the hrtb-for-function-pointer branch 2 times, most recently from efaa344 to 7657d40 Compare May 21, 2022 20:33
@Enselic Enselic force-pushed the hrtb-for-function-pointer branch from 7657d40 to 0b91573 Compare May 21, 2022 20:37
@Enselic Enselic marked this pull request as ready for review May 21, 2022 20:47
@Enselic Enselic merged commit 032c411 into main May 21, 2022
@Enselic Enselic deleted the hrtb-for-function-pointer branch May 21, 2022 20:47
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.

1 participant