Skip to content

rustdoc doesn't render generic params & where-clauses of cross-crate GATs in certain sections #112904

Closed
@fmease

Description

@fmease

While rustdoc does indeed render generic parameters and where-clauses of cross-crate GATs in the .item-decl of traits or in the section Required Associated Types for example, it doesn't do so in section Implementors on trait pages or section Trait Implementations on an implementor's page. I haven't exhaustively checked yet where precisely they're dropped and where they aren't.

Reproducer:

// a.rs

pub struct S;

pub trait Tr {
    type F<T>
    where
        (T,): Clone;
}

impl Tr for S {
    type F<T> = T
    where
        (T,): Clone;
}
// b.rs

pub use a::*;
rustc a.rs --crate-type=lib --edition=2021
rustdoc b.rs --crate-type=lib --edition=2021 --extern=a=liba.rlib

Screenshot 2023-06-21 at 20-44-55 Tr in unx - Rust

@rustbot claim
@rustbot label C-bug T-rustdoc A-cross-crate-reexports

Metadata

Metadata

Assignees

Labels

A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateC-bugCategory: This is a bug.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

No branches or pull requests

Issue actions