-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-synthetic-implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsC-bugCategory: This is a bug.Category: This is a bug.F-auto_traits`#![feature(auto_traits)]``#![feature(auto_traits)]`P-lowLow priorityLow priorityT-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.
Description
Background: User-written trait impls of a given type disqualify potential built-in auto trait impls (modulo simplify_type) ignoring some extra details.
Consider the following code:
#![feature(auto_traits)]
pub auto trait Marker {}
pub struct Subject;
impl<T> Marker for T {}Here, the existence of the blanket impl of Marker disqualifies any auto trait candidates. Meaning Subject impls Marker not due to a built-in auto trait impl but due to the blanket impl.
Therefore I expect to find impl<T> Marker for T under section Blanket Implementations on Subject's page. However, there is no such impl. It does correctly determine it shouldn't synthesize an auto trait impl of Marker for Subject.
If you delete the auto qualifier of trait Marker, then rustdoc will correctly detect and render impl<T> Marker for T.
Metadata
Metadata
Assignees
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-synthetic-implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsArea: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsC-bugCategory: This is a bug.Category: This is a bug.F-auto_traits`#![feature(auto_traits)]``#![feature(auto_traits)]`P-lowLow priorityLow priorityT-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.