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 renders stability attribute for trait implementations on type pages, but not trait pages #80777

Closed
jplatte opened this issue Jan 7, 2021 · 4 comments · Fixed by #81302
Assignees
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. A-trait-system Area: Trait system C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jplatte
Copy link
Contributor

jplatte commented Jan 7, 2021

For example, impl BitOr<NonZeroU128> for NonZeroU128 being stable since 1.45.0 is visible on the page for NonZeroU128:

Screenshot_2021-01-07 core num NonZeroU128 - Rust

but not on the page for BitOr:

Screenshot_2021-01-07 core ops BitOr - Rust

(also the latter doesn't have BitOr linkified while the former has NonZeroU128 linkified, but self-links seem less important)

@jonas-schievink jonas-schievink added A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 7, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 7, 2021

(also the latter doesn't have BitOr linkified while the former has NonZeroU128 linkified, but self-links seem less important)

I would guess the same bug is causing both issues.

@jyn514 jyn514 added the A-trait-system Area: Trait system label Jan 7, 2021
@LeSeulArtichaut
Copy link
Contributor

I'll try to investigate and see if I can find something interesting :)

@LeSeulArtichaut LeSeulArtichaut self-assigned this Jan 21, 2021
@LeSeulArtichaut
Copy link
Contributor

LeSeulArtichaut commented Jan 21, 2021

(kind of obvious) MCVE:

#![feature(staged_api)]

pub trait Foo {}

pub struct Bar;

#[stable(feature = "foobar", since = "1.0.0")]
impl Foo for Bar {}

@LeSeulArtichaut
Copy link
Contributor

LeSeulArtichaut commented Jan 23, 2021

(also the latter doesn't have BitOr linkified while the former has NonZeroU128 linkified, but self-links seem less important)

I would guess the same bug is causing both issues.

Not self-linking seems to be expected behavior, this was made in #32558 back in 2016. What looks inconsistent to me however is that "Implementations on Foreign Types" do self-link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stability Area: `#[stable]`, `#[unstable]` etc. A-trait-system Area: Trait system 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

Successfully merging a pull request may close this issue.

4 participants