Skip to content

rustdoc doesn't render HRTBs #78482

Closed
@WaffleLapkin

Description

@WaffleLapkin
Member

I tried this code:

pub fn test<T>() 
where
    for<'a> &'a T: Iterator,
{}

I expected rustdoc to render HRTB (for<'a>), but it doesn't:

image

Originally find while viewing keyberon docs.

Meta

rustdoc --version --verbose:

rustdoc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
binary: rustdoc
commit-hash: ffa2e7ae8fbf9badc035740db949b9dae271c29f
commit-date: 2020-10-24
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
LLVM version: 11.0

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Oct 28, 2020
added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Oct 28, 2020
jyn514

jyn514 commented on Oct 28, 2020

@jyn514
Member

Hmm, rustdoc should already handle this in

if !self.generic_params.is_empty() {
, which includes generic lifetimes: PolyTrait, GenericParamDef. Someone would need to investigate why that isn't showing up - I suspect somewhere in clean isn't handling it properly:
impl Clean<GenericBound> for hir::GenericBound<'_> {

added
E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
and removed
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on Oct 28, 2020
0xPoe

0xPoe commented on Oct 29, 2020

@0xPoe
Member

@jyn514 Can I working on this? I want to have a try.

jyn514

jyn514 commented on Oct 29, 2020

@jyn514
Member

@hi-rustin absolutely! If you have trouble, feel free to ask for help in the rustdoc channel or on Zulip :)

removed their assignment
on Mar 8, 2021
0xPoe

0xPoe commented on Mar 17, 2021

@0xPoe
Member

@rustbot claim

0xPoe

0xPoe commented on Apr 3, 2021

@0xPoe
Member

I started to try it.

12 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @Manishearth@jonas-schievink@jyn514@0xPoe@WaffleLapkin

    Issue actions

      rustdoc doesn't render HRTBs · Issue #78482 · rust-lang/rust