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: Trait implementations for Debug, Copy, Clone etc. link to nightly/core, even on stable #41000

Closed
chordowl opened this issue Apr 1, 2017 · 3 comments
Labels
C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@chordowl
Copy link
Contributor

chordowl commented Apr 1, 2017

When generating documentation for a type that implements Debug, Copy, Clone etc., the links regarding those traits in the Trait Implementations section link to, e.g., https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html.

I expected them to link to https://doc.rust-lang.org/std/fmt/trait.Debug.html etc.

To reproduce: rustdoc test.rs, where test.rs contains the following

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct Foo(u8);

// It's not dependant on it being derived, either
pub struct Bar(u8);

impl Clone for Bar {
    fn clone(&self) -> Bar {
        Bar(self.0)
    }
}
Meta

rustdoc --version --verbose:

rustdoc 1.16.0 (30cf806 2017-03-10)
binary: rustdoc
commit-hash: 30cf806
commit-date: 2017-03-10
host: x86_64-pc-windows-gnu
release: 1.16.0
LLVM version: 3.9

@chordowl chordowl changed the title Trait implementations for Debug, Copy, Clone etc. link to nightly/core, even on stable Rustdoc: Trait implementations for Debug, Copy, Clone etc. link to nightly/core, even on stable Apr 1, 2017
@durka
Copy link
Contributor

durka commented Apr 1, 2017

This has always been true and I believe it's due to this line (and the corresponding one in core). Maybe that attribute should be made to be dependent on release channel, in the compiler build process?

@Mark-Simulacrum Mark-Simulacrum added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Jun 20, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@kzys
Copy link
Contributor

kzys commented Sep 28, 2018

This line is the cause, as @durka wrote.

html_root_url = "https://doc.rust-lang.org/nightly/",

@ollie27
Copy link
Member

ollie27 commented Oct 10, 2020

Duplicate of #30693

@ollie27 ollie27 marked this as a duplicate of #30693 Oct 10, 2020
@ollie27 ollie27 closed this as completed Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. 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