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: Some trait bounds have incorrect URLs #14137

Closed
alxgnon opened this issue May 12, 2014 · 1 comment
Closed

rustdoc: Some trait bounds have incorrect URLs #14137

alxgnon opened this issue May 12, 2014 · 1 comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@alxgnon
Copy link
Contributor

alxgnon commented May 12, 2014

A couple examples in Rust's documentation:
serialize::Encodable => Click on Encoder
serialize::Decodable => Click on Decoder

This is a clear example of what kind of crate layout causes this error. Pass it through rustdoc and see for yourself:

pub use internal::{Foo, Bar};

mod internal {
    pub trait Foo {}
    pub trait Bar<T: Foo> {}
}

The Foo link in internal::Bar<T: Foo> will try to point to internal::Foo, even though the re-export moves the location of the documentation to the crate root.

@huonw
Copy link
Member

huonw commented May 25, 2014

cc @alexcrichton

alexcrichton added a commit to alexcrichton/rust that referenced this issue May 31, 2014
Cross crate links can target items which are not rendered in the documentation.
If the item is reexported at a higher level, the destination of the link (a
concatenation of the fully qualified name) may actually lead to nowhere. This
fixes this problem by altering rustdoc to emit pages which redirect to the local
copy of the reexported structure.

cc rust-lang#14515
Closes rust-lang#14137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants