-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
rustdoc doesn't consider blanket(!) impls of auto(!) traits #148980
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
Here, the existence of the blanket impl of
Markerdisqualifies any auto trait candidates. MeaningSubjectimplsMarkernot due to a built-in auto trait impl but due to the blanket impl.Therefore I expect to find
impl<T> Marker for Tunder section Blanket Implementations onSubject's page. However, there is no such impl. It does correctly determine it shouldn't synthesize an auto trait impl ofMarkerforSubject.If you delete the
autoqualifier of traitMarker, then rustdoc will correctly detect and renderimpl<T> Marker for T.