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

Closed
fatemender opened this issue Jul 18, 2019 · 3 comments
Closed

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

fatemender opened this issue Jul 18, 2019 · 3 comments

Comments

@fatemender
Copy link

@fatemender fatemender 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
Copy link
Contributor

@sinkuu sinkuu commented Jul 18, 2019

#61613 should fix this problem.

Loading

@Disasm
Copy link
Contributor

@Disasm Disasm commented Feb 11, 2020

It seems this issue is no longer present.
rustc 1.41.0 (5e1a79984 2020-01-27)

Loading

@jyn514
Copy link
Member

@jyn514 jyn514 commented Aug 27, 2020

Closing since this was fixed by #61613

Loading

@jyn514 jyn514 closed this Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants