Skip to content

rustdoc: Notable traits shows traits for &[u8] even though the return type is &[Attribute] #83123

Closed

Description

@camelid

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

Activity

  1. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Mar 14, 2021
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 14, 2021
  3. apiraino commented on Mar 17, 2021

    @apiraino
    Contributor

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

    @rustbot label -I-prioritize +P-medium

  4. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Mar 17, 2021
  5. added this to the 1.51.0 milestone on Apr 30, 2021
  6. added
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    and removed on Apr 30, 2021
  7. emilyalbini commented on Apr 30, 2021

    @emilyalbini
    Member

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

  8. steffahn commented on May 4, 2021

    @steffahn
    Member

    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

  9. removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on May 4, 2021
  10. camelid commented on May 5, 2021

    @camelid
    MemberAuthor

    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.

  11. camelid commented on Oct 22, 2021

    @camelid
    MemberAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions