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: Notable traits shows traits for &[u8] even though the return type is &[Attribute] #83123

Closed
camelid opened this issue Mar 14, 2021 · 5 comments
Labels
C-bug Category: This is a bug. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Milestone

Comments

@camelid
Copy link
Member

camelid commented Mar 14, 2021

This is in the rustc docs, but this can probably be reproduced pretty easily elsewhere.

beta (also on nightly)

image

stable

Note that there is no notable traits dialog:

image

@camelid camelid added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Mar 14, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 14, 2021
@apiraino
Copy link
Contributor

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 17, 2021
@pietroalbini pietroalbini added this to the 1.51.0 milestone Apr 30, 2021
@pietroalbini pietroalbini added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Apr 30, 2021
@pietroalbini
Copy link
Member

This affected 1.51.0, the regressed behavior is also present on stable. Changing the labels.

@steffahn
Copy link
Member

steffahn commented May 4, 2021

Reduced:

pub struct Attribute;

pub struct Map<'hir> {}
impl<'hir> Map<'hir> {
    pub fn attrs(&self) -> &'hir [Attribute] { &[] }
}

pub struct List<T>(T);

impl<T> std::ops::Deref for List<T> {
    type Target = [T];
    fn deref(&self) -> &[T] {
        &[]
    }
}

reduced example regresses at nightly-2021-01-09, 937f629 / #80653

The original rustc_middle docs regresses at the same nightly.

@rustbot label -E-needs-bisection -E-needs-mcve

@rustbot rustbot removed E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels May 4, 2021
@camelid
Copy link
Member Author

camelid commented May 5, 2021

Hmm, I wonder if the revert of that PR will fix this bug then. CC #84867. Would be nice to check once that PR is merged.

@camelid
Copy link
Member Author

camelid commented Oct 22, 2021

This issue seems to be fixed now, presumably because of the revert I mentioned above.

@camelid camelid closed this as completed Oct 22, 2021
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. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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

6 participants