Skip to content

Rustdoc doesn't use re-exported type aliases in function signatures #80557

Closed
@fleabitdev

Description

@fleabitdev

The glsp crate publicly re-exports everything from the glsp_engine crate:

//in lib.rs for the glsp crate
pub use glsp_engine::*;

The root of the glsp_engine crate defines a type alias, GResult. (This type alias is actually re-exported from a private module within the glsp_engine crate, but if I replace it with an inline definition, the bug doesn't change.)

//in lib.rs for the glsp_engine crate
type GResult<T> = Result<T, GError>;

When documenting the glsp_engine crate directly, Rustdoc will correctly document functions with a GResult return value.

However, when those functions are re-exported by the glsp crate, although the type alias itself is defined, the type alias is missing from function signatures.

Metadata

Metadata

Assignees

No one assigned

    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