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: handle generics better when matching notable traits #108954

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Mar 9, 2023

This commit makes the clean::Type::is_same non-commutative (renaming it is_doc_subtype_of), so that a generic impl matches a concrete return, but a generic return does not match a concrete impl. It makes slice and vector Write for u8 not match on every generic return value.

Fixes #100322

Fixes #55082

Preview:

This commit makes the `clean::Type::is_same` non-commutative, so
that a generic `impl` matches a concrete return, but a generic return
does not match a concrete `impl`. It makes slice and vector Write
for `u8` not match on every generic return value.
@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 9, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2023

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

Thanks for working on this issue!

src/librustdoc/clean/types.rs Outdated Show resolved Hide resolved
src/librustdoc/clean/types/tests.rs Show resolved Hide resolved
@camelid
Copy link
Member

camelid commented Mar 12, 2023

r? @camelid

@rustbot rustbot assigned camelid and unassigned jsha Mar 12, 2023
@notriddle notriddle requested a review from camelid March 13, 2023 16:54
src/librustdoc/clean/types.rs Show resolved Hide resolved
src/librustdoc/clean/types.rs Outdated Show resolved Hide resolved
@notriddle notriddle requested a review from camelid March 20, 2023 02:49
Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

Thanks again for fixing this!

@camelid
Copy link
Member

camelid commented Mar 22, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2023

📌 Commit 7f76084 has been approved by camelid

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 Mar 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 23, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108954 (rustdoc: handle generics better when matching notable traits)
 - rust-lang#109203 (refactor/feat: refactor identifier parsing a bit)
 - rust-lang#109213 (Eagerly intern and check CrateNum/StableCrateId collisions)
 - rust-lang#109358 (rustc: Remove unused `Session` argument from some attribute functions)
 - rust-lang#109359 (Update stdarch)
 - rust-lang#109378 (Remove Ty::is_region_ptr)
 - rust-lang#109423 (Use region-erased self type during IAT selection)
 - rust-lang#109447 (new solver cleanup + implement coherence)
 - rust-lang#109501 (make link clickable)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0392e29 into rust-lang:master Mar 23, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 23, 2023
@notriddle notriddle deleted the notriddle/notable-trait-generic branch March 23, 2023 15:11
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
5 participants