-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.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.
Description
In a cross-crate reexport of an impl Trait
-accepting function, rustdoc formats it in a wrong way which is not even valid Rust.
Let crate1
be:
pub trait MyTrait {}
pub fn accepts_impl(_t: impl MyTrait) {}
Let crate2
be:
pub use crate1::{MyTrait, accepts_impl};
If we generate docs for crate2
, we get this definition for the (re-exported) accepts_impl
:
pub fn accepts_impl<impl MyTrait>(_t: impl MyTrait)
where
impl MyTrait: MyTrait,
I see some similarities with #60113 here.
Both issues still reproduce on stable 1.36.0 and nightly bc2e84c.
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.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.