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

rustdoc: do not filter out cross-crate Self: Sized bounds #103254

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

fmease
Copy link
Member

@fmease fmease commented Oct 19, 2022

All type parameters except Self are implicitly Sized (via). 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 #24183.

@rustbot label T-rustdoc A-cross-crate-reexports
r? rustdoc

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 19, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2022
@rustbot rustbot added the A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate label Oct 19, 2022
@rust-highfive rust-highfive assigned jsha and unassigned CraftSpider Oct 19, 2022
@fmease
Copy link
Member Author

fmease commented Oct 22, 2022

r? @GuillaumeGomez

@rust-highfive rust-highfive assigned GuillaumeGomez and unassigned jsha Oct 22, 2022
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 23, 2022

📌 Commit f543770 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Oct 23, 2022
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 24, 2022
Rollup of 11 pull requests

Successful merges:

 - rust-lang#100462 (Clarify `array::from_fn` documentation)
 - rust-lang#101644 (Document surprising and dangerous fs::Permissions behaviour on Unix)
 - rust-lang#103005 (kmc-solid: Handle errors returned by `SOLID_FS_ReadDir`)
 - rust-lang#103140 (Add diagnostic for calling a function with the same name with unresolved Macro)
 - rust-lang#103254 (rustdoc: do not filter out cross-crate `Self: Sized` bounds)
 - rust-lang#103347 (bootstrap: also create rustc-src component in sysroot)
 - rust-lang#103402 (Fix wrapped valid-range handling in ty_find_init_error)
 - rust-lang#103414 (Pretty print lifetimes captured by RPIT)
 - rust-lang#103424 (rustdoc: remove no-op CSS `.code-header { border-bottom: none }`)
 - rust-lang#103434 (Use functions for jump-to-def-background rustdoc GUI test)
 - rust-lang#103447 (`MaybeUninit`: use `assume_init_drop()` in the partially initialized array example)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 28a1baf into rust-lang:master Oct 24, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 24, 2022
@fmease fmease deleted the fix-24183 branch October 25, 2022 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Self: Sized bounds in different crates are pruned
7 participants