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 and reexported types #45373

Closed
stanislav-tkach opened this issue Oct 18, 2017 · 6 comments
Closed

rustdoc and reexported types #45373

stanislav-tkach opened this issue Oct 18, 2017 · 6 comments

Comments

@stanislav-tkach
Copy link
Contributor

Example (lib.rs):

extern crate serde;

pub mod reexport {
    pub use serde::Serialize;
    pub use serde::ser::Error as SerError;
}

In the generated documentation for the reexport::SerError type there is a reference to the serde::Serialize, but this reference is broken (target/doc/reexport_test/trait.Serialize.html instead of target/doc/reexport_test/reexport/trait.Serialize.html).

@Freyskeyd
Copy link
Contributor

Hey @DarkEld3r

thank's for the report, can you provide a rust version please?

@stanislav-tkach
Copy link
Contributor Author

I have used rustc 1.20.0 (f3d6973f4 2017-08-27), but on the latest stable (rustc 1.21.0 (3b72af97e 2017-10-09)) there is the same problem.

@Freyskeyd
Copy link
Contributor

Yeah, I see. But I think it's a serde error.

https://docs.serde.rs/src/serde/ser/mod.rs.html#107

Anyway, I don't know if it's a doc generation error.

@stanislav-tkach
Copy link
Contributor Author

I'm also not sure if it is rustdoc bug: reexporting is specific case, but I prefer to create an issue to make sure if it is a problem or not. 😅

On the other hand, documentation works correctly for serde (https://docs.serde.rs/serde/trait.Serialize.html) itself, so it cannot (shouldn't) be fixed inside this crate.

@ollie27
Copy link
Member

ollie27 commented Oct 19, 2017

#43466 should fix issues like this.

@TimNN
Copy link
Contributor

TimNN commented Oct 22, 2017

This is currently expected behaviour since rustdoc doesn't do any kind of link rewriting currently. As @ollie27 noted, there are plans to support this in rustdoc so I'm gonna close this issue.

@TimNN TimNN closed this as completed Oct 22, 2017
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

No branches or pull requests

4 participants