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

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

Closed
fleabitdev opened this issue Dec 31, 2020 · 1 comment
Closed
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fleabitdev
Copy link

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.

@fleabitdev fleabitdev added the C-bug Category: This is a bug. label Dec 31, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 31, 2020
@jyn514 jyn514 added the A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate label Dec 31, 2020
@GuillaumeGomez
Copy link
Member

It's a duplicate of #15823 so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants