-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
The current implementation of #[doc(spotlight)]
(tracking issue #45040) doesn't work with any type aliases (Self
inclided):
#![feature(doc_spotlight)]
impl Spotlighted {
// doesn't work because of aliases
pub fn a() -> Self { unimplemented!() }
pub fn b() -> <Self as Trait>::Assoc { unimplemented!() }
pub fn c() -> Alias { unimplemented!() }
// works
pub fn the_only_that_works() -> Spotlighted { unimplemented!() }
}
pub trait Trait {
type Assoc: Spotlight;
// doesn't show spotlight although Assoc has bound
fn test() -> Self::Assoc { unimplemented!() }
}
#[doc(spotlight)]
pub trait Spotlight {}
pub struct Spotlighted;
impl Spotlight for Spotlighted {}
impl Trait for Spotlighted {
type Assoc = Self;
}
pub type Alias = Spotlighted;
Metadata
Metadata
Assignees
Labels
A-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.