rustdoc: synthetic impls don't include bounds that originate from the implementing type #111101
Labels
A-auto-traits
Area: auto traits (e.g., `auto trait Send {}`)
A-synthetic-impls
Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
For example, given
the impl of the auto trait
Send
synthesized for the generic typeTy
looks likewhile ideally its where clause should be
where T: Clone + Send
since in its current form it isn't well-typed: the trait boundT: Clone
is not satisfied (strictly speaking a manualSend
impl would have to be additionally marked asunsafe
to be well-formed but the omission is by design).According to the following paragraph from the PR description of the initial implementation of synthetic impls (#47833):
If we want to conform to this rule then the current behavior is incorrect (although it goes all the way back to said PR) since a copy-paste will lead to a type error.
Maybe all of this is intentional (less clutter, disk size reduction)? Opening for discussion (my bias: bug).
@rustbot label C-bug T-rustdoc A-auto-traits A-synthetic-impls
The text was updated successfully, but these errors were encountered: