-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 links to std library types can bypass the facade #22083
Comments
Triage: this is still true today. |
@lukaramu in the second link, it still looks like it's linking to libcollections, not to libstd? |
@steveklabnik seems like I was too superficial, my bad... Upon taking a closer look, there seem to be multiple components: A lot of trait implementors are duplicate, this seems to be #25061. The initial entries (mostly, see below) link within libstd (which led me to believe that this was fixed); the entries that are generated dynamically (everything after Then, even the not dynamically generated entry for the implementation by EnumSet links to libcollections, which in some way makes sense as it isn't in std::collections anyway. |
This is still a problem today. Documenting this library: use std::rc::Rc;
pub fn foo() -> Rc<()> {
Rc::new(())
} will produce a link to https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html rather than https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html. |
As an example, generate documentation for this:
On the docs for the
Trait
trait, there will be an Implementors section like this:impl<T> Trait for Vec<T>
Note that the
Vec
link goes to docs for thecollections
crate and not to docs forstd
. Since the 1.0 release will not host documentation for crates behind the facade, this will lead to broken documentation links for third-party crates.The text was updated successfully, but these errors were encountered: