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: don't mark Box<T> as Iterator, Read, etc #103432

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Oct 23, 2022

Because Box has pass-through implementations, rustdoc was giving it the "Notable Traits" treatment for Iterator, Read, Write, and Future, even when the type of T was unspecified.

Pin had the same problem, but just for Future.

Fixes #100320

@jsha jsha added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 23, 2022
@rust-highfive
Copy link
Collaborator

r? @notriddle

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2022
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Looks good to me, thanks! Please just add a trailing newline at the end of the test to fix the CI error.

// as being notably an Iterator (etc), though, so we exempt it. Pin has the same
// issue, with a pass-through impl for Future.
if Some(did) == cx.tcx().lang_items().owned_box() ||
Some(did) == cx.tcx().lang_items().pin_type() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's used just below to find impls.

@rust-log-analyzer

This comment has been minimized.

Because Box<T> has pass-through implementations, rustdoc was giving it the
"Notable Traits" treatment for Iterator, Read, Write, and Future, even when the
type of T was unspecified.

Pin had the same problem, but just for Future.
@jsha
Copy link
Contributor Author

jsha commented Oct 26, 2022

Fixed!

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 26, 2022

📌 Commit 63d1a72 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 26, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Oct 26, 2022
…meGomez

rustdoc: don't mark Box<T> as Iterator, Read, etc

Because Box<T> has pass-through implementations, rustdoc was giving it the "Notable Traits" treatment for Iterator, Read, Write, and Future, even when the type of T was unspecified.

Pin had the same problem, but just for Future.

Fixes rust-lang#100320
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 26, 2022
Rollup of 10 pull requests

Successful merges:

 - rust-lang#103432 (rustdoc: don't mark Box<T> as Iterator, Read, etc)
 - rust-lang#103526 (More dupe typos again)
 - rust-lang#103537 (rustdoc: combine shared CSS between `.*-line-numbers`)
 - rust-lang#103549 (llvm-16: Don't initialize removed legacy passes)
 - rust-lang#103558 (Update cargo)
 - rust-lang#103567 (ptr::eq: clarify that comparing dyn Trait is fragile)
 - rust-lang#103579 (:arrow_up: rust-analyzer)
 - rust-lang#103580 (Fix typo in docs for `guaranteed_ne`)
 - rust-lang#103596 (thread::set_name: debug-assert that things went well)
 - rust-lang#103598 (rustc_lexer::TokenKind improve docs)

Failed merges:

 - rust-lang#103585 (Migrate source line numbers CSS to CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ec7ffdf into rust-lang:master Oct 27, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 27, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…meGomez

rustdoc: don't mark Box<T> as Iterator, Read, etc

Because Box<T> has pass-through implementations, rustdoc was giving it the "Notable Traits" treatment for Iterator, Read, Write, and Future, even when the type of T was unspecified.

Pin had the same problem, but just for Future.

Fixes rust-lang#100320
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Rollup of 10 pull requests

Successful merges:

 - rust-lang#103432 (rustdoc: don't mark Box<T> as Iterator, Read, etc)
 - rust-lang#103526 (More dupe typos again)
 - rust-lang#103537 (rustdoc: combine shared CSS between `.*-line-numbers`)
 - rust-lang#103549 (llvm-16: Don't initialize removed legacy passes)
 - rust-lang#103558 (Update cargo)
 - rust-lang#103567 (ptr::eq: clarify that comparing dyn Trait is fragile)
 - rust-lang#103579 (:arrow_up: rust-analyzer)
 - rust-lang#103580 (Fix typo in docs for `guaranteed_ne`)
 - rust-lang#103596 (thread::set_name: debug-assert that things went well)
 - rust-lang#103598 (rustc_lexer::TokenKind improve docs)

Failed merges:

 - rust-lang#103585 (Migrate source line numbers CSS to CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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: notable traits triggers on smart pointers
7 participants