-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Self: Sized bounds in different crates are pruned #24183
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This also applies to |
This prompted a question on IRC about whether |
Triage: This still happens |
This actually ended up biting me today, is there a plan to handle this? I could help implement if I get pointers |
Add Sized trait display when implemented on type Fixes rust-lang#24183. I'm not too happy about the hack I had to add in here, however, it seems like the `Sized` trait is **very** special. cc `@jyn514` r? `@ollie27`
@GuillaumeGomez #78181 did not fix this - it now shows |
@guswynn I would start by finding out why this is different between local crates and cross-crate re-exports. I expect |
Ah, I also hit this today when looking at |
@rustbot claim |
rustdoc: do not filter out cross-crate `Self: Sized` bounds All type parameters **except `Self`** are implicitly `Sized` ([via](https://doc.rust-lang.org/nightly/std/marker/trait.Sized.html)). Previously, we disregarded the exception of `Self` and omitted cross-crate `Sized` bounds of *any* type parameter *including* `Self` when rendering. From now on, we *do* render cross-crate `Self: Sized` bounds. Most notably, in `std` we now finally properly render the `Sized` bound of the `Clone` trait as well as the `Self: Sized` bound on `Iterator::map`. Fixes rust-lang#24183. `@rustbot` label T-rustdoc A-cross-crate-reexports r? rustdoc
For example
Iterator::map
should have aSelf: Sized
bound, but we're a little too aggressive about pruning out theSized
bounds.For comparison
core::iter::Iterator::map
does indeed have the bound.The text was updated successfully, but these errors were encountered: