Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-crate re-export produces invalid rustdoc for impl Trait #62779

Open
fatemender opened this issue Jul 18, 2019 · 1 comment

Comments

@fatemender
Copy link

commented Jul 18, 2019

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.

@sinkuu

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

#61613 should fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.